Пример #1
0
 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();
         }
     }
 }
Пример #4
0
 public RPCMove(int move, Game.PlayerColor color)
 {
     this.move = move; this.color = color;
 }
Пример #5
0
 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;
 }