// Use this for initialization void Start() { library = GameObject.FindGameObjectWithTag("Library"); reference = library.GetComponent <MonsterLibrary>(); combatChoice = GameObject.Find("BattleUI"); combatRef = combatChoice.GetComponent <CombatChoiceManager>(); Level = 1; AssignAttributes(); //DisplayStats(); }
// Use this for initialization void Start() { unitSpawner = GameObject.Find("UnitSpawner"); spawnRef = unitSpawner.GetComponent <SpawnUnits>(); combatMenuManager = GameObject.FindGameObjectWithTag("MainBattleUI"); combatMenuRef = combatMenuManager.GetComponent <CombatChoiceManager>(); combatMenuManager.gameObject.SetActive(false); rowRef = 0; columnRef = 0; unitRef = 0; this.transform.SetPositionAndRotation(new Vector3(spawnRef.enemyArray[unitRef].transform.position.x, spawnRef.enemyArray[unitRef].transform.position.y + 1.58f, spawnRef.enemyArray[unitRef].transform.position.z), Quaternion.identity); }
// Use this for initialization void Start() { unitRef = 0; tileHolder = GameObject.Find("TileHolder"); tileInfo = tileHolder.GetComponent <TileInfo>(); currentSide = tileInfo.tileArrayLeft; unitSpawner = GameObject.Find("UnitSpawner"); spawnRef = unitSpawner.GetComponent <SpawnUnits>(); combatManager = GameObject.Find("CombatCoordinator"); combatManagerRef = combatManager.GetComponent <CombatManager>(); combatMenuManager = GameObject.FindGameObjectWithTag("MainBattleUI"); combatMenuRef = combatMenuManager.GetComponent <CombatChoiceManager>(); combatMenuManager.gameObject.SetActive(false); for (int i = 0; i < currentSide.Length; i++) { tileRef = currentSide[i].GetComponent <TileProperties>(); if (tileRef.CurrentUnit == combatManagerRef.attacker) { Debug.Log("Unit Found"); } } }