public override void StartBehavior(Mob mob) { base.StartBehavior(mob); mob.Anim.SetTrigger("run"); mob.Nav.isStopped = false; mData = (RunBehaviorData)data; }
public override void Start() { base.Start(); uiCanvas = FindObjectOfType <Canvas>().transform; if (hpBar == null) { hpBar = Instantiate(hpBarPrefab, uiCanvas).GetComponent <HPBar>(); } fsm = GetComponent <FSM>(); runBehaviorData = new RunBehaviorData(transform.position); }