First commit

This commit is contained in:
Regalis
2015-05-25 01:04:03 +03:00
commit fadb89ae9e
320 changed files with 32186 additions and 0 deletions
+51
View File
@@ -0,0 +1,51 @@
using System;
using Microsoft.Xna.Framework;
namespace Subsurface.Networking
{
enum PacketTypes
{
Login,
LoggedIn,
LogOut,
PlayerJoined,
PlayerLeft,
KickedOut,
StartGame,
EndGame,
CharacterInfo,
Chatmessage,
UpdateNetLobby,
NetworkEvent,
Traitor
}
class NetworkMember
{
protected static Color[] messageColor = { Color.Black, Color.DarkRed, Color.DarkBlue, Color.DarkGreen };
protected TimeSpan updateInterval;
protected DateTime updateTimer;
protected bool gameStarted;
public void AddChatMessage(string message, ChatMessageType messageType)
{
Game1.netLobbyScreen.NewChatMessage(message, messageColor[(int)messageType]);
if (Game1.gameSession != null) Game1.gameSession.NewChatMessage(message, messageColor[(int)messageType]);
GUI.PlayMessageSound();
}
}
enum ChatMessageType
{
Default, Admin, Dead, Server
}
}