Esempio n. 1
0
        public void CheckDeads()
        {
            List <Fighter> fighters = GetAllFighters().FindAll(x => x.Alive == true && x.Stats.CurrentLifePoints <= 0);

            if (fighters.Count > 0)
            {
                Fighter playingFighter = null;

                bool seq = SequencesManager.StartSequence(SequenceTypeEnum.SEQUENCE_CHARACTER_DEATH);

                foreach (var fighter in fighters)
                {
                    if (fighter.IsFighterTurn)
                    {
                        playingFighter = fighter;
                    }

                    fighter.Die(fighter);
                }

                if (seq)
                {
                    SequencesManager.EndSequence(SequenceTypeEnum.SEQUENCE_CHARACTER_DEATH);
                }

                if (playingFighter != null)// && !Ended)
                {
                    playingFighter.PassTurn();
                }
            }
        }
Esempio n. 2
0
        public void TeleportFightersToInitialPosition(Fighter source)
        {
            bool sequence = SequencesManager.StartSequence(SequenceTypeEnum.SEQUENCE_MOVE);

            foreach (var fighter in GetAllFighters())
            {
                if (fighter.CellId != fighter.FightStartCell)
                {
                    fighter.Teleport(source, new MapPoint(fighter.FightStartCell));
                }
            }

            if (sequence)
            {
                SequencesManager.EndSequence(SequenceTypeEnum.SEQUENCE_MOVE);
            }
        }