public void randomType(Scene scene, int type, BaseMSprise bigs) { this.type = type; int index = type; if (index >= 10) index = index / 10; if (sprite == null) { sprite = new AnimatedSprite(backgroud.getX(), backgroud.getY(), bigs.getRegCat().deepCopy()); scene.attachChild(sprite); } update(scene); }
public boolean isSelected(int x, int y) { return backgroud.getX() < x && x < (backgroud.getX() + backgroud.getWidth()) && backgroud.getY() < y && y < (backgroud.getY() + backgroud.getHeight()); }