Exemplo n.º 1
0
  public BasicPlateau() {
    StaticData s = (StaticData) getStaticData();

    mSprite = s.sprite.yieldStatic(Layers.PLATEAU);
    mSprite.setIndex(getGame().getRandom(4));
    mSprite.setListener(this);
  }
Exemplo n.º 2
0
  public Mortar() {
    mInaccuracy = getProperty("inaccuracy");
    mExplosionRadius = getProperty("explosionRadius");

    StaticData s = (StaticData) getStaticData();

    mSpriteBase = s.spriteBase.yieldStatic(Layers.TOWER_BASE);
    mSpriteBase.setIndex(getGame().getRandom(4));
    mSpriteBase.setListener(this);

    mSpriteCanon = s.spriteCanon.yieldAnimated(Layers.TOWER);
    mSpriteCanon.setIndex(getGame().getRandom(4));
    mSpriteCanon.setListener(this);
    mSpriteCanon.setSequence(mSpriteCanon.sequenceForwardBackward());
    mSpriteCanon.setInterval(REBOUND_DURATION);
  }
Exemplo n.º 3
0
 @Override
 public void preview(Canvas canvas) {
   mSpriteBase.draw(canvas);
   mSpriteCanon.draw(canvas);
 }