Пример #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 SceneLoadLogic createLoadLogic()
        {
            if (!_g8)
            {
                _m8 = instance.Type.GetMethod("createLoadLogic", 0);
                _g8 = true;
            }

            if (_m8 != null && !_b8)
            {
                _b8 = true;
                SceneLoadLogic re = (SceneLoadLogic)appdomain.Invoke(_m8, instance, null);
                _b8 = false;
                return(re);
            }
            else
            {
                return(base.createLoadLogic());
            }
        }