Exemplo n.º 1
0
    void Start()
    {
        bt       = GameObject.FindWithTag("Player1").GetComponent <BehaviourTree>();
        resource = resourceGameObject.GetComponent <Resource>();
        ResultLogger.assignLoggerVariables();
        ResultLogger.tryCreateFile();


        p1GoldCount      = 0;
        p2GoldCount      = 0;
        playerGoldCounts = new int[numberOfPlayers];

        for (int i = 0; i < playerGoldCounts.Length; i++)
        {
            playerGoldCounts[i] = 0;
        }

        displayGoldCount();


        InvokeRepeating("addGold", 0.001f, goldTimer);


        if (Resources.Count <= 0)
        {
            spawnResource();
            //Debug.Log("Resources count: " + Resources.Count);
        }
        if (Troops == null)
        {
            //Debug.Log("Troops list is null");
        }
    }