protected override UnitIdentityLogic createIdentityLogic() { if (!_g7) { _m7 = instance.Type.GetMethod("createIdentityLogic", 0); _g7 = true; } if (_m7 != null && !_b7) { _b7 = true; UnitIdentityLogic re = (UnitIdentityLogic)appdomain.Invoke(_m7, instance, null); _b7 = false; return(re); } else { return(base.createIdentityLogic()); } }
//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); } } }