Exemplo n.º 1
0
 public void Apply(GameState gameState, MinionAnimationBatch moveAnim)
 {
     for (int Idx = 0; Idx < spawns.Count; ++Idx)
     {
         int index = gameState.spawnIndices[Idx];
         if (index < spawns[Idx].Count)
         {
             MinionType spawntype = spawns[Idx][index];
             if (spawntype != null)
             {
                 if (gameState.getMinionAt(levelType.spawnPoint[Idx]) == null)
                 {
                     gameState.CreateEnemy(spawntype, levelType.spawnPoint[Idx], moveAnim);
                     gameState.spawnIndices[Idx]++;
                 }
             }
             else
             {
                 gameState.spawnIndices[Idx]++;
             }
         }
     }
 }
Exemplo n.º 2
0
        public bool CheckAttack(GameState gameState, int bonusDamage, Point attackPos, MinionAnimationBatch attack, MinionAnimationBatch recover)
        {
            if (deleted)
                return false;

            Minion m = gameState.getMinionAt(attackPos);
            if (m == null || isEnemy == m.isEnemy || m.stats.health <= 0 || m.stats.hasKeyword(Keyword.attackproof))
                return false;

            Attack(gameState, m, bonusDamage, attack, recover);
            return true;
        }