コード例 #1
0
    /** 注册逻辑体 */
    protected virtual void registLogics()
    {
        if ((unitFactory = createUnitFactoryLogic()) != null)
        {
            addLogic(unitFactory);
        }

        if ((inout = createInOutLogic()) != null)
        {
            addLogic(inout);
        }

        if ((role = createRoleLogic()) != null)
        {
            addLogic(role);
        }

        if ((pos = createPosLogic()) != null)
        {
            addLogic(pos);
        }

        if ((show = createShowLogic()) != null)
        {
            addLogic(show);
        }

        //必须存在
        addLogic(load = createLoadLogic());

        if ((fight = createFightLogic()) != null)
        {
            addLogic(fight);
        }

        //必须存在
        addLogic(camera = createCameraLogic());

        //添加battle逻辑
        if ((battle = createBattleLogic()) != null)
        {
            addLogic(battle);
        }

        //添加play逻辑
        if ((method = createMethodLogic()) != null)
        {
            addLogic(method);
        }
        else
        {
            Ctrl.throwError("不能没有play");
        }
    }
コード例 #2
0
        protected override SceneFightLogic createFightLogic()
        {
            if (!_g9)
            {
                _m9 = instance.Type.GetMethod("createFightLogic", 0);
                _g9 = true;
            }

            if (_m9 != null && !_b9)
            {
                _b9 = true;
                SceneFightLogic re = (SceneFightLogic)appdomain.Invoke(_m9, instance, null);
                _b9 = false;
                return(re);
            }
            else
            {
                return(base.createFightLogic());
            }
        }