Exemple #1
0
    void Start()
    {
        //Get GameController from StaticRef
        gC = StaticRef.gameControllerRef.GetComponent <GameController> ();

        //Get Components
        agent           = GetComponent <NavMeshAgent> ();
        triggerCollider = GetComponent <SphereCollider> ();
        health          = GetComponent <UnitHealth> ();
        health.unit     = this;
        controller      = GetComponent <UnitController> ();
        controller.unit = this;
        stateC          = GetComponent <UnitStateController> ();
        if (stateC != null)
        {
            stateC.unit = this;
        }
        condM      = GetComponent <UnitConditionManager> ();
        condM.unit = this;

        //Load unit from UnitRef
        if (preset != null && loadRefValues)
        {
            preset.LoadUnitFromRef(this);
        }
        controller.InitializeController();
        health.InitializeHealth();
    }
Exemple #2
0
 public override ConditionReturn MethodCall(UnitConditionManager uCM)
 {
     return(uCM.ReadTaunt());
 }
Exemple #3
0
 public abstract ConditionReturn MethodCall(UnitConditionManager uCM);