]> Dogcows Code - chaz/carfire/blob - Project06/CS 3505 Project 06/CS 3505 Project 06/ChatPacket.cs
Chat implemented. Needs testing.
[chaz/carfire] / Project06 / CS 3505 Project 06 / CS 3505 Project 06 / ChatPacket.cs
1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4 using System.Text;
5 using Microsoft.Xna.Framework.Net;
6
7 namespace CS_3505_Project_06
8 {
9 /// <summary>
10 /// Small container class for the information concerning a chat packet.
11 /// It is immutable.
12 /// </summary>
13 public class ChatPacket
14 {
15 // Private member variables
16 #region Instance Variables
17
18 NetworkGamer mSender;
19 String mMessage;
20
21 #endregion
22
23
24 /// <summary>
25 /// Get the game who sent the chat packet.
26 /// </summary>
27 public NetworkGamer Sender
28 {
29 get { return mSender; }
30 }
31
32 /// <summary>
33 /// Get the message that was sent by the sender.
34 /// </summary>
35 public String Message
36 {
37 get { return mMessage; }
38 }
39
40
41 /// <summary>
42 /// Construct a chat packet with contents.
43 /// </summary>
44 /// <param name="sender">The chat sender.</param>
45 /// <param name="message">The chat message.</param>
46 public ChatPacket(NetworkGamer sender, String message)
47 {
48 mSender = sender;
49 mMessage = message;
50 }
51 }
52 }
This page took 0.032663 seconds and 4 git commands to generate.