예제 #1
0
 public override void Enter()
 {
     count = Random.Range(1.7f, 2.2f);
     enemy.anim.CrossFade("lizarrd_att", 0.2f);
     if (enemy.fighting)
     {
         enemy.FFaceToPlayer();
     }
 }
예제 #2
0
    public override void Update()
    {
        count -= Time.deltaTime;

        if (count < 0)
        {
            enemy.FFaceToPlayer();
            enemy.enemy.SetStage(enemy.lizarrd_walk_stage);
        }
    }
예제 #3
0
 public override void Update()
 {
     if (enemy.fighting && Vector3.Distance(enemy.transform.position, testplayer.Instance.transform.position) < 5 && enemy.FSeePlayer())
     {
         enemy.FFaceToPlayer();
     }
     enemy.transform.Translate(enemy.transform.right * -enemy.faceto * enemy.movespeed * Time.deltaTime, Space.Self);
     if (enemy.FCheckFilp())
     {
         enemy.enemy.SetStage(enemy.lizarrd_stand_stage);
     }
     if (enemy.FSeePlayer())
     {
         enemy.enemy.SetStage(enemy.lizarrd_run_stage);
     }
     else if (enemy.FAttPlayer())
     {
         enemy.enemy.SetStage(enemy.lizarrd_att_stage);
         ////anim.SetTrigger("att");
         //anim.CrossFade("lizarrd_att", 0.2f);
     }
 }