public GameInfo(string username, Game.PlayerColor myColor, bool gameOver = false, Game.PlayerColor winnerColor = Game.PlayerColor.None)
 {
     this.username    = username;
     this.myColor     = myColor;
     this.gameOver    = gameOver;
     this.winnerColor = winnerColor;
 }
示例#2
0
 public ConnectedPlayer(ConnectedClient client, int id, string username, Game.PlayerColor color = Game.PlayerColor.None, int iconNumber = 0)
 {
     this.client     = client;
     this.roomID     = id;
     this.username   = username;
     this.iconNumber = iconNumber;
     this.color      = color;
 }
示例#3
0
 private void activateNewSetTimer(Game.PlayerColor color, float maxTime)
 {
     foreach (KeyValuePair <Game.PlayerColor, ClientUserPanelUI> storedValue in playerColorToUserPanel)
     {
         if (storedValue.Key == color)
         {
             playerColorToUserPanel [storedValue.Key].startTimer(maxTime);
         }
         else
         {
             playerColorToUserPanel [storedValue.Key].stopTimer();
         }
     }
 }
 public RPCMove(int move, Game.PlayerColor color)
 {
     this.move = move; this.color = color;
 }
 private void sendString(int targetID, MsgType type, string str, Game.PlayerColor color)
 {
     sendMsg(new StringMessage(str, color), targetID, (short)type);
 }
 //Server
 public void sendMove(int targetID, string move, Game.PlayerColor color)
 {
     sendString(targetID, MsgType.move, move, color);
 }
示例#7
0
 public static LocalPlayer getPlayerFromColor(PlayerColor color)
 {
     return(players.Find(x => x.info.color == color));
 }
示例#8
0
 public static bool hasLocalPlayerOfColor(PlayerColor color)
 {
     return(players.Find(x => x.info.color == color) != null);
 }
示例#9
0
 public ConnectedPlayer getMatchingPlayer(PlayerColor color)
 {
     return(players.Find(x => x.color == color));
 }
示例#10
0
 public void initTimer(Game.PlayerColor color, float maxTime)
 {
     playerColorToUserPanel [color].initTurnTime(maxTime);
 }
示例#11
0
 public void removeConnectedPlayer(Game.PlayerColor color, string username, int iconNumber)
 {
     playerColorToUserPanel [color].clearPanel();
 }
示例#12
0
 public void initPlayerSlot(Game.PlayerColor color, string username, int iconNumber)
 {
     playerColorToUserPanel [color].setUserPanel(iconNumber, username);
 }
示例#13
0
 public override void onOutgoingLocalMsg(string msg, Game.PlayerColor color)
 {
     print("Sending server msg: " + msg + "  from: " + color);
 }
示例#14
0
 public GameCommand(Game.PlayerColor myColor, SpeedRunnerProtocol.PlayerCommand command)
 {
     this.command = command;
     this.myColor = myColor;
 }
示例#15
0
 public abstract void onOutgoingLocalMsg(string msg, PlayerColor color);
示例#16
0
 public void startTimer(Game.PlayerColor color, float maxTime)
 {
     activateNewSetTimer(color, maxTime);
 }
 public static int convertColorToTeam(Game.PlayerColor color)
 {
     return(color == PlayerColor.Blue ? 1 : 2);
 }
示例#18
0
 public StringMessage(string msg, PlayerColor color = PlayerColor.None)
 {
     this.msg = msg; this.color = color;
 }