IEnumerator DeadChk()
    {
        while (this.enemyAI.IsAttack)
        {
            yield return(new WaitForEndOfFrame());
        }

        enemyAI.AttackEnd();
        enemyAI.IdleTimeChk(enemyAI.fIdleTime);
        this.gameObject.SetActive(false);
        yield break;
    }
Exemplo n.º 2
0
    public IEnumerator PunchReturn(Vector3 endPos, IBasicAI enemyAI, int patternIndex)
    {
        float fTime = 0f;

        while (fTime < 1f)
        {
            fTime += Time.deltaTime * 1.5f;
            this.transform.localPosition = Vector3.Lerp(this.transform.localPosition, endPos, fTime);
            yield return(new WaitForEndOfFrame());
        }

        this.transform.localPosition = new Vector3(this.transform.localPosition.x, -0.2f, this.transform.localPosition.z);
        fTime = 0f;

        enemyAI.AttackEnd();
        enemyAI.IdleTimeChk(enemyAI.fIdleTime);
        enemyAI.LivingEntity.gameObject.SendMessage("PatternCoolDownSetting", patternIndex);
        myArm.ArmAttackEnd();

        bIsRocketPunch = false;
        yield break;
    }
 public void AttackEnd()
 {
     enemyAI.AttackEnd();
     enemyAI.IdleTimeChk(enemyAI.fIdleTime);
 }