/// <summary> /// 玩家死亡 /// </summary> private void PlayerDeath(DeathDto deathDto) { string msg = "<color=##ffa502>" + userDtoDict[deathDto.KillerAccount].Name + "</color>" + deathDto.Reason + "<color=##ffa502>" + userDtoDict[deathDto.VictimAccount].Name + "</color>\n"; Dispatch(AreaCode.UI, UIEvent.UI_SET_GAME_INFO, msg); DestroyPlayer(deathDto.VictimAccount); }
private void ReceivePlayerDeath(DeathDto dto) { if (dto == null) { return; } Dispatch(AreaCode.GAME, GameEvent.GAME_PLAYER_DEATH, dto); }
/// <summary> /// 本地玩家死亡 /// </summary> private void LocalPlayerDeath(DamageMesg mesg) { Debug.Log("AWSL"); DestroyPlayer(localAcc); DeathDto deathDto = new DeathDto(mesg.Account, localAcc, "戳死了");//TODO 枚举定义原因 smg.Change(OpCode.GAME, GameCode.GAME_DEATH_CERQ, deathDto); Dispatch(AreaCode.NET, 0, smg); string msg = "<color=#ff4757>" + userDtoDict[deathDto.KillerAccount].Name + "</color>" + deathDto.Reason + "<color=##ffa502>" + userDtoDict[deathDto.VictimAccount].Name + "</color>\n"; Dispatch(AreaCode.UI, UIEvent.UI_SET_GAME_INFO, msg); Dispatch(AreaCode.UI, UIEvent.UI_SHOWHIDE_ETC, false); }