コード例 #1
0
 public void MakeMove(Vector2Int pos, Player player)
 {
     Map.PlayerUse(Map.cellMap[pos], player, _tilemap);
     for (int addX = -1; addX <= 1; ++addX)
     {
         for (int addY = -1; addY <= 1; ++addY)
         {
             Vector2Int neighbourPos = new Vector2Int(pos.x + addX, pos.y + addY);
             if (!Map.cellMap.ContainsKey(neighbourPos))
             {
                 continue;
             }
             FieldCell neighbour = Map.cellMap[neighbourPos];
             neighbour.isAvaiable = Map.IsAvaiable(neighbourPos, _tilemap);
         }
     }
     currentPlayerIndex++;
     currentPlayerIndex %= players.Length;
 }