/// <summary>
        /// 离开房间
        /// </summary>
        /// <param name="self"></param>
        public static int LeaveRoom(this UnitRoomComponent self)
        {
            var room = Game.Scene.GetComponent <RoomManagerComponent>().Get(self.RoomId);

            if (room == null)
            {
                return(0);
            }
            room.LeaveRoom(self.GetParent <Unit>());
            return(0);
        }
 public static void Awake(this UnitRoomComponent self, long tableId)
 {
     Log.Debug("RoomId:" + tableId);
     self.RoomId = tableId;
 }