コード例 #1
0
    /** 开始一个变量CD */
    public void startCDVar(int id, int varID)
    {
        CDData data = toStartOneCD(CDConfig.get(id), _parent.getSkillVarValue(varID));

        if (data != null)
        {
            _parent.onCDChange();
        }
    }
コード例 #2
0
ファイル: BuffDataLogic.cs プロジェクト: shineTeam7/home3
    /** 执行一个完成动作 */
    protected virtual void doOneOverAction(int[] args)
    {
        bool isDriveAll = _parent.isDriveAll();

        switch (args[0])
        {
        case BuffOverActionType.AddAttribute:
        {
            if (!isDriveAll)
            {
                return;
            }

            _parent.attribute.addOneAttribute(args[1], args[2]);
        }
        break;

        case BuffOverActionType.AddAttributeVar:
        {
            if (!isDriveAll)
            {
                return;
            }

            _parent.attribute.addOneAttribute(args[1], _parent.getSkillVarValue(args[2]));
        }
        break;

        case BuffOverActionType.MakeAttack:
        {
            _parent.doBuffAttack(args[1], args[2]);
        }
        break;

        case BuffOverActionType.AddBuff:
        {
            if (!isDriveAll)
            {
                return;
            }

            addBuff(args[1], args[2]);
        }
        break;

        case BuffOverActionType.RemoveBuffByID:
        {
            if (!isDriveAll)
            {
                return;
            }

            removeBuffByID(args[1]);
        }
        break;

        case BuffOverActionType.StartCD:
        {
            if (!isDriveAll)
            {
                return;
            }

            _parent.cd.startCD(args[1]);
        }
        break;

        case BuffOverActionType.StartCDVar:
        {
            if (!isDriveAll)
            {
                return;
            }

            _parent.cd.startCDVar(args[1], args[2]);
        }
        break;

        default:
        {
            _parent.doOneBuffOverActionEx(args);
        }
        break;
        }
    }