Example #1
0
        private void AfterActionUpdate()
        {
            foreach (Player player in players)
            {
                if (player.Status == PlayerStatus.Playing && DefeatCondition(this, player))
                {
                    player.Defeat(false);
                }
            }

            for (int i = 0; i < Actors.Count; i++)
            {
                if (!Actors[i].IsAlive)
                {
                    Actors[i].TempTile.RemoveTempObject();
                    DeletedActors.Add(Actors[i]);
                    Actors.RemoveAt(i);
                    i--;
                }
            }

            for (int i = 0; i < Decorations.Count; i++)
            {
                if (!Decorations[i].IsAlive)
                {
                    Decorations[i].TempTile.RemoveTempObject();
                    DeletedDecorations.Add(Decorations[i]);
                    Decorations.RemoveAt(i);
                    i--;
                }
            }

            for (int i = 0; i < SpecEffects.Count; i++)
            {
                if (!SpecEffects[i].IsAlive)
                {
                    DeletedEffects.Add(SpecEffects[i]);
                    SpecEffects.RemoveAt(i);
                    i--;
                }
            }
        }