コード例 #1
0
ファイル: Player.cs プロジェクト: DfKimera/campjam12
        public void sendMatchInfo(Dictionary<int, Unit> gameUnits, int[] gameMap, Player hostPlayer, Player guestPlayer)
        {
            string unitList = "";
            foreach(KeyValuePair<int, Unit> kv in gameUnits) {
                unitList += kv.Value.id + ":" + Convert.ToInt32(kv.Value.owner.isHost) + ":" + kv.Value.type + ","; // unitID:isHost:type
            }

            string tileList = String.Join(",", gameMap);

            send(Message.Create(MessageType.SV_GAME_PREPARE, unitList, tileList, hostPlayer.uid, hostPlayer.name, guestPlayer.uid, guestPlayer.name));
        }
コード例 #2
0
ファイル: Player.cs プロジェクト: DfKimera/campjam12
 public void chatMessage(Player sender, String message)
 {
     send(Message.Create(MessageType.SV_CHAT_MESSAGE, sender.uid, sender.name, message));
 }