コード例 #1
0
        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);
            }
        }
コード例 #2
0
        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);
                }
            }
        }