示例#1
0
文件: TimeLine.cs 项目: Mixi59/Stump
        public bool RemoveFighter(FightActor fighter)
        {
            if (!Fighters.Contains(fighter))
            {
                return(false);
            }

            var index = Fighters.IndexOf(fighter);

            Fighters.Remove(fighter);

            if (index > Index)
            {
                return(true);
            }

            if (index > 0)
            {
                Index--;
            }
            else
            {
                Index = Fighters.Count - 1;
            }

            return(true);
        }
示例#2
0
 public int GetFighterIndex(Fighter fighter)
 {
     return(Fighters.IndexOf(fighter));
 }