Exemple #1
0
 public IEnumerator OnAtk(EnemyActionTable.ActionTypeInfo actionTypeInfo)
 {
     while (!character.IsChangeableAction(Character.ACTION_ID.ATTACK))
     {
         yield return((object)0);
     }
     character.ActAttack(actionTypeInfo.id, true, false);
 }
Exemple #2
0
 public IEnumerator OnAngry(EnemyActionTable.ActionTypeInfo actionTypeInfo, uint angryId)
 {
     while (!character.IsChangeableAction((Character.ACTION_ID) 14))
     {
         yield return((object)0);
     }
     enemy.ActAngry(actionTypeInfo.id, angryId);
 }
Exemple #3
0
    private IEnumerator OnAttackOfAction()
    {
        EnemyActionTable.EnemyActionData nowActData = enemyBrain.actionCtrl.nowAction.data;
        if (nowActData.lotteryWaitInterval > 0f)
        {
            nowActData.lotteryWaitTime = Time.get_time();
        }
        int j = 0;

        for (int i = nowActData.combiActionTypeInfos.Length; j < i; j++)
        {
            EnemyActionTable.ActionTypeInfo actionTypeInfo = nowActData.combiActionTypeInfos[j];
            switch (actionTypeInfo.type)
            {
            case EnemyActionTable.ACTION_TYPE.STEP:
                yield return((object)this.StartCoroutine(OnStep(false)));

                break;

            case EnemyActionTable.ACTION_TYPE.STEP_BACK:
                yield return((object)this.StartCoroutine(OnStep(true)));

                break;

            case EnemyActionTable.ACTION_TYPE.ROTATE:
                yield return((object)this.StartCoroutine(OnRotateToTarget()));

                break;

            case EnemyActionTable.ACTION_TYPE.MOVE:
                yield return((object)this.StartCoroutine(OnMoveToTarget()));

                break;

            case EnemyActionTable.ACTION_TYPE.MOVE_HOMING:
                yield return((object)this.StartCoroutine(OnMoveHoming()));

                break;

            case EnemyActionTable.ACTION_TYPE.ATTACK:
                yield return((object)this.StartCoroutine(OnAtk(actionTypeInfo)));

                break;

            case EnemyActionTable.ACTION_TYPE.ANGRY:
                yield return((object)this.StartCoroutine(OnAngry(actionTypeInfo, nowActData.angryId)));

                break;

            case EnemyActionTable.ACTION_TYPE.MOVE_SIDE:
                yield return((object)this.StartCoroutine(OnMoveSideways()));

                break;

            case EnemyActionTable.ACTION_TYPE.MOVE_POINT:
                yield return((object)this.StartCoroutine(OnMovePoint()));

                break;

            case EnemyActionTable.ACTION_TYPE.MOVE_LOOKAT:
                yield return((object)this.StartCoroutine(OnMoveLookAt()));

                break;
            }
        }
        while (!character.IsChangeableAction(Character.ACTION_ID.NONE))
        {
            yield return((object)0);
        }
        float time = nowActData.afterWaitTime;

        if (enemyParameter != null)
        {
            time += enemyParameter.baseAfterWaitTime;
        }
        if (enemy.packetSender != null)
        {
            time = enemy.packetSender.GetWaitTime(time);
        }
        if (time > 0f)
        {
            yield return((object)new WaitForSeconds(time));
        }
    }