예제 #1
0
    public override void StartBehavior(Mob mob)
    {
        base.StartBehavior(mob);

        mob.Anim.SetTrigger("run");
        mob.Nav.isStopped = false;
        mData             = (RunBehaviorData)data;
    }
예제 #2
0
파일: NPC.cs 프로젝트: justdoit7724/RPG
    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);
    }