void Start() { scene = GameObject.FindWithTag("GameManger").GetComponent <SceneBuilder>(); GameObject player2 = GameObject.FindWithTag("Player2"); player2ScriptAI = player2.GetComponent <PlayerGOAPAI>(); spawner = scene.base2.GetComponent <Spawner>(); WSU = player2.GetComponent <WorldStateUpdater>(); costToApply = scene.troopCosts[troopClass] - WSU.classCounts[(int)troopClass]; }
void Start() { scene = GameObject.FindWithTag("GameManager").GetComponent <SceneBuilder>(); // thisTeamNumber = GetComponent<PlayerGOAPAI>().teamNumber; thisTeamNumber = TeamNumber.t2; Debug.Log("WSU Team NUmber: " + thisTeamNumber); player2AI = GetComponent <PlayerGOAPAI>(); spawner = scene.base2.GetComponent <Spawner>(); Debug.Log("WSU spawner assigned" + spawner); classCounts = new int[scene.unitPrefabs.Length]; enemiesCloseToBase = new List <GameObject>(); alliesCloseToBase = new List <GameObject>(); // goapAction = GetComponent<GoapAction>(); }