//Initialize void Start() { _turnManager = GameObject.Find("_combatMan").GetComponent <TurnManager>(); _generator = GameObject.Find("_combatMan").GetComponent <CombatGenerator>(); _player = GameObject.Find("Player").GetComponent <PlayerTurn>(); _target = GameObject.Find("Player").GetComponent <Transform>(); _midPoint = GameObject.Find("MidPoint"); _originPos = transform.position; }
void Start() { //Initialize the scripts _player = GameObject.Find("Player").GetComponent <PlayerTurn>(); _generator = gameObject.GetComponent <CombatGenerator>(); _combatOver = GameObject.Find("EndCanvas").GetComponent <CombatOver>(); //Initialize the _enemy script by picking one from the _generator script for (int i = 1; i < _generator._sortedInit.Count; i++) { if (_generator._sortedInit[i]._charName != "Player") { _enemy = _generator._sortedInit[i]._go.GetComponent <EnemyScript>(); } } //Begin the turn ActivateGO(); }