public void takeDamage(Int32 receiverID, Int32 damage) { Dbg.DEBUG_MSG(className + "::takeDamage: receiverID = " + receiverID + " damage =" + damage); cellEntityCall.takeDamage(receiverID, damage); }
public virtual void onJump() { Dbg.DEBUG_MSG(className + "::onJump: " + id); Event.fireOut("otherAvatarOnJump", new object[] { this }); }
public virtual void onRemoveSkill(Int32 skillID) { Dbg.DEBUG_MSG(className + "::onRemoveSkill(" + skillID + ")"); Event.fireOut("onRemoveSkill", new object[] { this }); SkillBox.inst.remove(skillID); }
public virtual void set_subState(object old) { Dbg.DEBUG_MSG(classtype + "::set_subState: " + getDefinedPropterty("subState")); }
public virtual void set_spaceUType(object old) { Dbg.DEBUG_MSG(classtype + "::set_spaceUType: " + getDefinedPropterty("spaceUType")); }
public void reqRemoveAvatar(string name) { Dbg.DEBUG_MSG("Account::reqRemoveAvatar: name=" + name); baseCall("reqRemoveAvatar", name); }
public virtual void enterWorld() { Dbg.DEBUG_MSG(classtype + "::enterWorld(" + getDefinedPropterty("uid") + "): " + id); inWorld = true; Event.fire("onEnterWorld", new object[] { this }); }
public void sendtoCompleteCallBack(object sender, SocketAsyncEventArgs e) { Dbg.DEBUG_MSG("Udp sendtoCompleteCallBack"); }
/// <summary> /// 在非主线程执行:连接服务器 /// </summary> private void _asyncConnect(ConnectState state) { Dbg.DEBUG_MSG(string.Format("NetworkInterfaceBase::_asyncConnect(), will connect to '{0}:{1}' ...", state.connectIP, state.connectPort)); onAsyncConnect(state); }
public void onUse(Int32 targetID) { Dbg.DEBUG_MSG(className + "::onUse: " + targetID); Event.fireOut("onUse", new object[] { this, targetID }); }
public override void onStateChanged(SByte oldValue) { Dbg.DEBUG_MSG(className + "::set_state: " + oldValue + " => " + state); Event.fireOut("set_state", new object[] { this, state }); }
public override void onHPChanged(Int32 oldValue) { Dbg.DEBUG_MSG(className + "::set_HP: " + oldValue); Event.fireOut("set_HP", new object[] { this, HP, HP_Max }); }
public override void OnFire(Int32 value) { Dbg.DEBUG_MSG(className + "::OnFire value = " + value); Event.fireOut("otherAvatarOnFire", new object[] { this, value }); }
public void Fire(Int32 value) { Dbg.DEBUG_MSG(className + "::Fire value = " + value); cellEntityCall.Fire(value); }
public override void helloCB(Int32 arg1) { Dbg.DEBUG_MSG("Test::helloCB: arg1(" + arg1 + ")!"); //((Avatar)owner).cellEntityCall.component1.hello(795); }
public void recv() { if (socket_ == null || socket_.Connected == false) { throw new ArgumentException("invalid socket!"); } if (socket_.Poll(100000, SelectMode.SelectRead)) { if (socket_ == null || socket_.Connected == false) { Dbg.WARNING_MSG("invalid socket!"); return; } int successReceiveBytes = 0; try { successReceiveBytes = socket_.Receive(_datas, MemoryStream.BUFFER_MAX, 0); } catch (SocketException err) { if (err.ErrorCode == 10054 || err.ErrorCode == 10053) { Dbg.DEBUG_MSG(string.Format("NetworkInterface::recv(): disable connect!")); if (socket_ != null && socket_.Connected) { socket_.Close(); } socket_ = null; } else { Dbg.ERROR_MSG(string.Format("NetworkInterface::recv(): socket error(" + err.ErrorCode + ")!")); } Event.fireAll("onDisableConnect", new object[] {}); return; } if (successReceiveBytes > 0) { // Dbg.DEBUG_MSG(string.Format("NetworkInterface::recv(): size={0}!", successReceiveBytes)); } else if (successReceiveBytes == 0) { Dbg.DEBUG_MSG(string.Format("NetworkInterface::recv(): disable connect!")); if (socket_ != null && socket_.Connected) { socket_.Close(); } socket_ = null; Event.fireAll("onDisableConnect", new object[] {}); } else { Dbg.ERROR_MSG(string.Format("NetworkInterface::recv(): socket error!")); if (socket_ != null && socket_.Connected) { socket_.Close(); } socket_ = null; Event.fireAll("onDisableConnect", new object[] {}); return; } msgReader.process(_datas, (MessageLength)successReceiveBytes); } }
public void reqCreateAvatar(Byte roleType, string name) { Dbg.DEBUG_MSG("Account::reqCreateAvatar: roleType=" + roleType); baseCall("reqCreateAvatar", roleType, name); }
public override void onFirstEntityHello(string content) { Dbg.DEBUG_MSG("Account::onFirstEntityHello:content=\r\n" + content); Event.fireOut(AccountEvents_Out.EventNames.OnFirstEntityHello, content); }
public void selectAvatarGame(UInt64 dbid) { Dbg.DEBUG_MSG("Account::selectAvatarGame: dbid=" + dbid); baseCall("selectAvatarGame", dbid); }
public void _EnterGame() { Dbg.DEBUG_MSG("Account::enterGame"); this.baseEntityCall.enterGame(); }
public virtual void leaveWorld() { Dbg.DEBUG_MSG(classtype + "::leaveWorld: " + id); inWorld = false; Event.fire("onLeaveWorld", new object[] { this }); }
public override void onEnterGameSuccess() { Dbg.DEBUG_MSG("Account::onEnterGameSuccess!"); Event.fireOut(AccountEvents_Out.EventNames.OnEnterGameSuccess); }
public virtual void set_uid(object old) { Dbg.DEBUG_MSG(classtype + "::set_uid: " + getDefinedPropterty("uid")); }
public virtual void onAddSkill(Int32 skillID) { Dbg.DEBUG_MSG(className + "::onAddSkill(" + skillID + ")"); //Event.fireOut("onAddSkill", new object[] { this }); Skill skill = new Skill(); skill.id = skillID; skill.name = skillID + " "; switch (skillID) { case 1: skill.displayType = Skill_DisplayType.SkillDisplay_Event_Bullet; skill.canUseDistMax = 30f; skill.skillEffect = "Ice1"; skill.name = "魔法球"; break; case 2: skill.displayType = Skill_DisplayType.SkillDisplay_Event_Bullet; skill.canUseDistMax = 30f; skill.skillEffect = "Fire1"; skill.name = "火球"; break; case 3: skill.displayType = Skill_DisplayType.SkillDisplay_Event_Bullet; skill.canUseDistMax = 20f; skill.skillEffect = "Medical1"; skill.name = "治疗"; break; case 4: skill.displayType = Skill_DisplayType.SkillDisplay_Event_Effect; skill.canUseDistMax = 5f; skill.skillEffect = "MagicEffect1"; skill.name = "斩击"; break; case 5: skill.displayType = Skill_DisplayType.SkillDisplay_Event_Effect; skill.canUseDistMax = 5f; skill.skillEffect = "LightningEffect1"; skill.name = "挥击"; break; case 6: skill.displayType = Skill_DisplayType.SkillDisplay_Event_Effect; skill.canUseDistMax = 5f; skill.skillEffect = "BloodEffect1"; skill.name = "吸血"; break; case 6000101: skill.canUseDistMax = 20f; skill.skillEffect = "skill3"; break; default: break; } ; SkillBox.inst.add(skill); if (SkillBox.inst.skills.Count == 3) { Event.fireOut("setSkillButton"); } }
public virtual void set_forbids(object old) { Dbg.DEBUG_MSG(classtype + "::set_forbids: " + getDefinedPropterty("forbids")); }
public override void onOwnChanged(Int32 oldValue) { Dbg.DEBUG_MSG("Test::onOwnChanged: own(" + own + ")!"); }
public virtual void onAddSkill(Int32 skillID) { Dbg.DEBUG_MSG(className + "::onAddSkill(" + skillID + ")"); Event.fireOut("onAddSkill", new object[] { this }); Skill skill = new Skill(); skill.id = skillID; skill.name = skillID + " "; switch (skillID) { case 1: break; case 1000101: skill.canUseDistMax = 20f; skill.icon = "skill_1_1"; skill.name = "天地一绝"; skill.descr = "思呢?我们可以在某个脚本中将组件"; break; case 2000101: skill.canUseDistMax = 20f; skill.icon = "skill_1_2"; skill.name = "自高无上"; skill.descr = "一下讲解:最先执行的方法是Awake"; break; case 3000101: skill.canUseDistMax = 20f; skill.icon = "skill_2_1"; skill.name = "潜龙勿用"; skill.descr = "里虽然可以使用C#来写代码"; break; case 4000101: skill.canUseDistMax = 20f; skill.icon = "skill_2_2"; skill.name = "弹指神通"; skill.descr = "脚本进行验证(两个脚本添加到"; break; case 5000101: skill.canUseDistMax = 20f; skill.icon = "skill_3_1"; skill.name = "神之挽歌"; skill.descr = "是这个类构造对象的生命周期"; break; case 6000101: skill.canUseDistMax = 20f; skill.icon = "skill_3_2"; skill.name = "暗影一击"; skill.descr = "觉得有不对之处,欢迎指"; break; default: break; } ; SkillBox.inst.add(skill); }
public override void onStateChanged(Int32 oldValue) { Dbg.DEBUG_MSG("Test::onOwnChanged: state(" + state + ")!"); }
public void errorInfo(Int32 errorCode) { Dbg.DEBUG_MSG("errorInfo(" + errorCode + ")"); }
public override void onReqAvatarList(AVATAR_INFOS_LIST infos) { Dbg.DEBUG_MSG("Account::onReqAvatarList: avatarsize=" + infos.values.Count); Event.fireOut(AccountEvent_Out.EventName.onReqAvatarList, new object[] { infos }); }