protected override UnitAvatarLogic createAvatarLogic() { if (!_g10) { _m10 = instance.Type.GetMethod("createAvatarLogic", 0); _g10 = true; } if (_m10 != null && !_b10) { _b10 = true; UnitAvatarLogic re = (UnitAvatarLogic)appdomain.Invoke(_m10, instance, null); _b10 = false; return(re); } else { return(base.createAvatarLogic()); } }
//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); } } }