예제 #1
0
 //回傳是否得到晶球 得到->true 沒得到->false
 private bool GetSightOrNot(int playerID)
 {
     if (_mapData.getSightPos().Exists(Point => Point.x == _mapData.getPlayerPos(playerID).x&& Point.y == _mapData.getPlayerPos(playerID).y))
     {
         int SightID = _mapData.getSightPos().FindIndex(Point => Point.x == _mapData.getPlayerPos(playerID).x&& Point.y == _mapData.getPlayerPos(playerID).y);
         _mapData.removeSight(SightID);
         _sight[SightID].SetActive(false);
         SightPosInit();
         return(true);
     }
     return(false);
 }