Example #1
0
    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();
    }
Example #2
0
 public void FindTarget()
 {
     _unitAttack.FindTarget(this, _lastTargetUnit, IsAlly ? FightManager.SceneInstance.EnemyUnits : FightManager.SceneInstance.AllyUnits,
                            OnTargetFound, OnTargetAttack);
 }