public void Start() { GameObject scriptObj = GameObject.Find("Scripts"); manager = scriptObj.GetComponent("wordManager") as wordManager; GameObject scoreObj = GameObject.Find("Score"); scoreClass = scoreObj.GetComponent("score") as score; GameObject heartsObj = GameObject.Find("Hearts"); hs = heartsObj.GetComponent("heartsSystem") as heartsSystem; }
//public float searchRange; /* INHERITED FROM PLAYER */ // List<Unit> unitsOnMove // List<Structure> playerStructures; // int totalUnits; // int totalGold; // currentAction new void Start() { base.Start(); this.pickedFirstAction = false; this.listOfAttackingUnits = new List <Unit>(5); this.typingPhase = 1; this.defaultAttackFactor = 1.0; this.numberOfStructuresOnMap = GameObject.FindGameObjectsWithTag("Structure").Length; this.playerMeasurementsRef = GameObject.Find("MeasurementManager").GetComponent <MeasurementManager>(); this.wordManagerRef = GameObject.Find("WordManager").GetComponent <wordManager>(); InvokeRepeating("updateAITypingSpeed", 0, 5); executeMainLoop(); }