Esempio n. 1
0
    private void Start()
    {
        if (Instance == null)
        {
            Instance = this;
        }
        if (GameStateManager.Instance.MatchType != MatchTypes.Singleplayer)
        {
            return;
        }
        PlayerAIs = new AI_BaseClass[2];

        for (int i = 0; i < PlayerAIs.Length; i++)
        {
            isPlayerAI[i] = Player.Players[i].Type == PlayerType.AI;
            if (isPlayerAI[i])
            {
                PlayerAIs[i] = new AI_BaseClass(i);
            }
            else
            {
                PlayerAIs[i] = null;
            }
        }
        TurnManager.Instance.NewTurnEvent += OnNewTurn;
    }
Esempio n. 2
0
 public void ClearAIs()
 {
     if (PlayerAIs[0] != null)
     {
         PlayerAIs[0] = new AI_BaseClass(0);
     }
     if (PlayerAIs[1] != null)
     {
         PlayerAIs[1] = new AI_BaseClass(1);
     }
 }
Esempio n. 3
0
 public void EvaluateTiles(AI_BaseClass ai, UnitScript currentUnit, List <Tile> possibleMoves)
 {
     Debug.Log("Evaluation for: " + currentUnit + "on tile: " + currentUnit.myTile);
     StartCoroutine(ai.EvaluatePossibleMoves(currentUnit, possibleMoves));
 }