public override void Enter() { count = 0.2f; enemy.anim.CrossFade("stand", 0.2f); //enemy.transform.Translate(enemy.transform.right * -enemy.faceto * enemy.movespeed * 2.5f * Time.deltaTime, Space.Self); if (enemy.FCheckFilp()) { enemy.faceto *= -1; } }
public override void Update() { //if (enemy.fighting) //{ // enemy.FFaceToPlayer(); //} if (enemy.FCheckFilp()) { enemy.enemy.SetStage(enemy.lancer_stand_stage); } //if (enemy.fighting&&Vector3.Distance(enemy.transform.position,testplayer.Instance.transform.position)<5) //{ // enemy.FFaceToPlayer(); //} if (enemy.FSeePlayer() && Random.Range(0, 3) != 0) { if (enemy.attcd < 0) { if (enemy.weapon.stage == 1 || enemy.weapon.stage == 4) { enemy.enemy.SetStage(enemy.lancer_throw_stage); } else { enemy.enemy.SetStage(enemy.lancer_throw1_stage); } enemy.attcd = 5; } } else if (enemy.FAttPlayer()) { if ((enemy.transform.position.x - testplayer.Instance.transform.position.x) * enemy.faceto > 0) { enemy.enemy.SetStage(enemy.lancer_exatt_stage); } else { if (Random.Range(0, 3) != 1) { enemy.enemy.SetStage(enemy.lancer_att_stage); } else { enemy.enemy.SetStage(enemy.lancer_exatt_stage); } } } enemy.transform.Translate(enemy.transform.right * -enemy.faceto * enemy.movespeed * Time.deltaTime, Space.Self); }