Ejemplo n.º 1
0
        protected override UnitShowLogic createShowLogic()
        {
            if (!_g14)
            {
                _m14 = instance.Type.GetMethod("createShowLogic", 0);
                _g14 = true;
            }

            if (_m14 != null && !_b14)
            {
                _b14 = true;
                UnitShowLogic re = (UnitShowLogic)appdomain.Invoke(_m14, instance, null);
                _b14 = false;
                return(re);
            }
            else
            {
                return(base.createShowLogic());
            }
        }
Ejemplo n.º 2
0
    //logics

    /** 注册逻辑体 */
    protected override void registLogics()
    {
        if ((identity = createIdentityLogic()) != null)
        {
            addLogic(identity);
        }
        else
        {
            Ctrl.throwError("不能没有identity");
        }

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

        //战斗单位再加
        if (BaseC.constlist.unit_canFight(_type))
        {
            if ((avatar = createAvatarLogic()) != null)
            {
                addLogic(avatar);
            }

            if ((move = createMoveLogic()) != null)
            {
                addLogic(move);
            }

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

            if ((ai = createAILogic()) != null)
            {
                addLogic(ai);
            }

            if ((aiCommand = createAICommandLogic()) != null)
            {
                addLogic(aiCommand);
            }
        }

        //角色控制逻辑
        if (isHero)
        {
            if ((control = createCharacterControlLogic()) != null)
            {
                addLogic(control);
            }
        }

        //show放下面
        if ((show = createShowLogic()) != null)
        {
            addLogic(show);
        }
        else
        {
            Ctrl.throwError("不能没有show");
        }

        //head最后
        if (BaseC.constlist.unit_needHead(_type))
        {
            if ((head = createHeadLogic()) != null)
            {
                addLogic(head);
            }
        }
    }