Ejemplo n.º 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");
        }
    }
Ejemplo n.º 2
0
        protected override SceneMethodLogic createMethodLogic()
        {
            if (!_g11)
            {
                _m11 = instance.Type.GetMethod("createPlayLogic", 0);
                _g11 = true;
            }

            if (_m11 != null && !_b11)
            {
                _b11 = true;
                SceneMethodLogic re = (SceneMethodLogic)appdomain.Invoke(_m11, instance, null);
                _b11 = false;
                return(re);
            }
            else
            {
                return(base.createMethodLogic());
            }
        }