private void OnHappyPlayerQuit(MsgBase b) { var quitMsg = (Msg_HappyPlayerQuit)b; uint quid = quitMsg.Uid; if (OtherPlayerList.ContainsKey(quid)) { var player = OtherPlayerList[quid]; player.StopAllActions(); this.RemoveChild(player); OtherPlayerList.Remove(quid); } }
private void OnHappyPlayerMove(MsgBase b) { var moveMsg = (Msg_HappyPlayerMove)b; uint uid = moveMsg.Uid; if (OtherPlayerList.ContainsKey(uid)) { var player = OtherPlayerList[uid]; if (player != null) { var dire = MoveDirectionToPointConverter.PointConvertToMoveDirection(new Point(moveMsg.X, moveMsg.Y)); player.Move(dire); } } }