]> Dogcows Code - chaz/carfire/blobdiff - CarFire/CarFire/CarFire/ChatInfo.cs
Implemented the base architecture we are bound to because of how the network code...
[chaz/carfire] / CarFire / CarFire / CarFire / ChatInfo.cs
diff --git a/CarFire/CarFire/CarFire/ChatInfo.cs b/CarFire/CarFire/CarFire/ChatInfo.cs
new file mode 100644 (file)
index 0000000..fa6c0d1
--- /dev/null
@@ -0,0 +1,52 @@
+using System;\r
+using System.Collections.Generic;\r
+using System.Linq;\r
+using System.Text;\r
+using Microsoft.Xna.Framework.Net;\r
+\r
+namespace CarFire\r
+{\r
+    /// <summary>\r
+    /// Small container class for the information concerning a chat packet.\r
+    /// It is immutable.\r
+    /// </summary>\r
+    public class ChatInfo\r
+    {\r
+        // Private member variables\r
+        #region Instance Variables\r
+\r
+        NetworkGamer mSender;\r
+        String mMessage;\r
+\r
+        #endregion\r
+\r
+\r
+        /// <summary>\r
+        /// Get the sender who sent the chat packet.\r
+        /// </summary>\r
+        public NetworkGamer Sender\r
+        {\r
+            get { return mSender; }\r
+        }\r
+\r
+        /// <summary>\r
+        /// Get the message that was sent by the sender.\r
+        /// </summary>\r
+        public String Message\r
+        {\r
+            get { return mMessage; }\r
+        }\r
+\r
+\r
+        /// <summary>\r
+        /// Construct a chat packet with contents.\r
+        /// </summary>\r
+        /// <param name="sender">The chat sender.</param>\r
+        /// <param name="message">The chat message.</param>\r
+        public ChatInfo(NetworkGamer sender, String message)\r
+        {\r
+            mSender = sender;\r
+            mMessage = message;\r
+        }\r
+    }\r
+}\r
This page took 0.022099 seconds and 4 git commands to generate.