コード例 #1
0
        public static ActionParameter GetActionParameterByActionType(eActionType actionType, out bool isSuccess)
        {
            ActionParameter action = new ActionParameter();

            isSuccess = true;
            switch (actionType)
            {
            case eActionType.ATTACK:
                action = new AttackAction();
                break;

            case eActionType.MOVE:
                action = new MoveAction();
                break;

            case eActionType.KNOCK:
                action = new KnockAction();
                break;

            case eActionType.WAVE_START_IDLE:
                action = new WaveStartIdleAction();
                break;

            case eActionType.BUFF_DEBUFF:
                action = new BuffDebuffAction();
                break;

            default:
                isSuccess = false;
                break;
            }
            return(action);
        }
コード例 #2
0
        public static ActionParameter GetActionParameterByActionType(eActionType actionType, out bool isSuccess)
        {
            ActionParameter action = new ActionParameter();

            isSuccess = true;
            switch (actionType)
            {
            case eActionType.ATTACK:
                action = new AttackAction();
                break;

            case eActionType.MOVE:
                action = new MoveAction();
                break;

            case eActionType.KNOCK:
                action = new KnockAction();
                break;

            case eActionType.HEAL:
                action = new HealAction();
                break;

            case eActionType.BARRIER:
                action = new BarrierAction();
                break;

            case eActionType.REFLEXIVE:    //这个没有继承类,就用基类
                action = new ActionParameter();
                break;

            case eActionType.CHANGE_SPEED:
                action = new ChangeSpeedAction();
                break;

            case eActionType.SLIP_DAMAGE:
                action = new SlipDamageAction();
                break;

            case eActionType.BUFF_DEBUFF:
                action = new BuffDebuffAction();
                break;

            case eActionType.BLIND:
                action = new BlindAction();
                break;

            case eActionType.CHARGE_ENERGY:
                action = new ChargeEnergyAction();
                break;

            case eActionType.DAMAGE_CHARGE:
                action = new DamageChargeAction();
                break;

            case eActionType.NO_DAMAGE:
                action = new NoDamageAction();
                break;

            case eActionType.GIVE_VALUE_AS_ADDITIVE:
                action = new GiveValueAdditiveAction();
                break;

            case eActionType.GIVE_VALUE_AS_MULTIPLE:
                action = new GiveValueMultipleAction();
                break;

            case eActionType.IF_FOR_AL:
                action = new IfForAllAction();
                break;

            case eActionType.ACCUMULATIVE_DAMAGE:
                action = new AccumulativeDamageAction();
                break;

            case eActionType.CHANGE_PARAMETER_FIELD:
                action = new ChangeParameterFieldAction();
                break;

            case eActionType.WAVE_START_IDLE:
                action = new WaveStartIdleAction();
                break;

            case eActionType.SKILL_EXEC_COUNT:
                action = new SkillExecCountAction();
                break;


            default:
                isSuccess = false;
                break;
            }
            return(action);
        }