internal void addAnimation(ScreenAnimation screenAnimation) { this._screenAnimationsToAdd.Add(screenAnimation); }
public void onAnimationTrigger(ScreenAnimation screenAnimaton) { started = true; origin -= _screen.getMapOffset(); control1 = new Vector2(origin.X, destination.Y); control2 = new Vector2((origin.X - destination.X) / 2f, destination.Y); }
public void onAnimationTrigger(ScreenAnimation screenAnimaton) { if (screenAnimaton is LootTwinkle) { if (!doppel) { _coinMeterTimer = COIN_METER_FLASH_TIME; _coinSprites.Add(new Coin(this, BASE_COIN_START_POSITION, new Vector2(BASE_COIN_POSITION.X, BASE_COIN_POSITION.Y - _coins * 4f))); _coins++; if (_coins >= MAX_COINS) { doppel = true; PikeAndShotGame.DOPPEL_UP.Play(); coinMeterTimer = COIN_METER_DROPTIME; int i = 0; foreach (Coin c in _coinSprites) { c.finalPosition.Y = COIN_METER_POSITION.Y + COIN_METER_OFFSET + 48 - i++ * 4f; } } } else if (_doubleCoins < MAX_COINS) { _coinMeterTimer = COIN_METER_FLASH_TIME; _doppelCoinSprites.Add(new Coin(this, BASE_COIN_START_POSITION, new Vector2(BASE_COIN_POSITION.X, BASE_COIN_POSITION.Y + 10f - _doubleCoins * 4f))); _doubleCoins++; if (_doubleCoins >= MAX_COINS) { if (((ArrayList)_formation._supportRows[0]).Count < 4) { foreach (Coin c in _doppelCoinSprites) { c.drop(BASE_COIN_POSITION.Y + 14f); } _doubleCoins = 0; spawnRescue(Soldier.TYPE_SWINGER); PikeAndShotGame.POWER_UP.Play(); } } } } }
public ArquebusierShot(Vector2 position, BattleScreen screen, int side, float height, SoundEffectInstance hitSound) : base(position, screen, side, height, hitSound) { _speed = 0.5f; _damage = 1; _animationTime = 150f; _sprite = new Sprite(PikeAndShotGame.ARQUEBUSIER_SHOT3, new Rectangle(16, 4, 2, 2), 18, 8); _ground = new Sprite(PikeAndShotGame.ARQUEBUSIER_GROUND, new Rectangle(16, 12, 2, 2), 30, 14); // create separate smoke animation that is not dependant on the shot itself _smoke = new ArquebusierSmoke(screen, side, position); metaphoricalHeight = 0f; }