public void SelectUnit() { //actually select the starting unit for the player CombatPhaseManager.Current.currentUnitSelected.GetComponent <Interactive>().Select(); //turn on the unit portrait if it is not enabled already if (InfoManager.Current.SelectedUnitPortrait.enabled == false) { InfoManager.Current.SelectedUnitPortrait.enabled = true; } //enable the attack script UnitAttack attackScript = CombatPhaseManager.Current.currentUnitSelected.AddComponent <UnitAttack>(); //pass off to UnitAttack to wait and listen for an attack attackScript.FindTarget(); }
public void FindTarget() { _unitAttack.FindTarget(this, _lastTargetUnit, IsAlly ? FightManager.SceneInstance.EnemyUnits : FightManager.SceneInstance.AllyUnits, OnTargetFound, OnTargetAttack); }