private void Start() { RegisterSoldier(); actionsLeft = actions; animations = GetComponent <SoldierAnimatorController>(); if (animations == null) { Debug.LogWarning("Missing SoldierAnimatorController component on " + name + ". Could be intentional.", transform); } }
/** * Executed when state starts * @param obj */ public virtual void start(GameObject obj) { this.from = obj; this.fromCtrl = obj.GetComponent <CharacterController>(); this.fromAttr = obj.GetComponent <BasicObjectAttr>(); this.animatorController = obj.GetComponent <SoldierAnimatorController>(); if (this.fromAttr == null || this.fromCtrl == null) { throw new ExecutionEngineException("All characters must have a character controller and character attributes"); } }
void Start() { animatorController = GetComponent <SoldierAnimatorController>(); }