Exemple #1
0
  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);
  }
Exemple #2
0
 public boolean isSelected(int x, int y) {
   return backgroud.getX() < x
       && x < (backgroud.getX() + backgroud.getWidth())
       && backgroud.getY() < y
       && y < (backgroud.getY() + backgroud.getHeight());
 }