示例#1
0
文件: Game.cs 项目: posdon/Insa-world
        //Clear EntityWaitingList and Import all Entity From Current Player
        public void GetEntityListFromCurrPlayer()
        {
            List <Entity> tampon = ListPlayer[CurrPlayerNumber].EntityList;

            EntityWaitingList.Clear();
            foreach (Entity e in tampon)
            {
                if (e.Pos != -1)
                {
                    EntityWaitingList.Add(e);
                }
            }
        }
示例#2
0
文件: Game.cs 项目: posdon/Insa-world
 //Get the first Entity in EntityWaitingList, set it as currentEntity and remove it from EntityWaitingList. If there is no more entity waiting, currEntity=null
 public bool SetCurrentEntity()
 {
     if (EntityWaitingList.Count > 0)
     {
         CurrEntity = EntityWaitingList[0];
         EntityWaitingList.Remove(CurrEntity);
         return(true);
     }
     else
     {
         CurrEntity = null;
         return(false);
     }
 }