コード例 #1
0
ファイル: GameServerGame.cs プロジェクト: Amitkapadi/WISP
        /// <summary>
        /// Sends a textual informational message to a player
        /// </summary>
        /// <param name="msg">the message</param>
        /// <param name="includeObservers">if observers should be included</param>
        /// <param name="targetPlayers">explicit list of message targets, or null for everyone</param>
        public void SendGameInfoMessageToPlayer(ServerCharacterInfo toon, string msg)
        {
            PacketGameInfoNotification note = new PacketGameInfoNotification();

            note.Message = msg;
            SendPacketToPlayer(toon, note);
        }
コード例 #2
0
ファイル: GameServerGame.cs プロジェクト: Amitkapadi/WISP
        /// <summary>
        /// Sends a textual informational message to all players
        /// </summary>
        /// <param name="msg">the message</param>
        /// <param name="includeObservers">if observers should be included</param>
        /// <param name="targetPlayers">explicit list of message targets, or null for everyone</param>
        public void BroadcastGameInfoMessage(string msg, bool includeObservers)
        {
            PacketGameInfoNotification note = new PacketGameInfoNotification();

            note.Message = msg;
            BroadcastToPlayersInGame(note, includeObservers);
        }
コード例 #3
0
        private void OnGameInfoNotification(INetworkConnection con, Packet msg)
        {
            PacketGameInfoNotification info = msg as PacketGameInfoNotification;

            if (info != null)
            {
                OnGameInfoNotification(con, info);
            }
        }
コード例 #4
0
 protected virtual void OnGameInfoNotification(INetworkConnection con, PacketGameInfoNotification msg)
 {
     Log.LogMsg(">>> Game Info Message: " + msg.Message);
     AddMessage(FormatString(GameStringType.SystemMessage, "-->" + msg.Message));
 }
コード例 #5
0
ファイル: ClientGame.cs プロジェクト: kamilion/WISP
 protected virtual void OnGameInfoNotification(INetworkConnection con, PacketGameInfoNotification msg)
 {
     Log.LogMsg(">>> Game Info Message: " + msg.Message);
     AddMessage(FormatString(GameStringType.SystemMessage, "-->" + msg.Message));
 }