コード例 #1
0
        private void HandlePlayGameMessage(NetIncomingMessage im)
        {
            var message = new InGameMessage(im);

            if (!this.IsHost)
            {
                if (message.Play)
                {
                    tileManager.NewGame();
                }
                else if (!message.Play && TileGrid.GameState == GameStates.Lobby)
                {
                    Disconnect();
                }
            }
        }
コード例 #2
0
ファイル: Snakez.cs プロジェクト: romeguarin/XNAZuneGames
        /// <summary>
        /// Initializes the start message for the game.
        /// </summary>
        void initializeStartMessage()
        {
            startMessage = new MessageType();

            InGameMessage temp;

            temp = new InGameMessage("Press the Play/Pause \n     button to start", "Fonts/Lindsey", new Vector2(30, 70), Color.Red);
            startMessage.addMessage(temp, "Press Start");

            temp = new InGameMessage("You lost a life", "Fonts/Lindsey", new Vector2(70, 140), Color.Black);
            temp.displayMessage(false);
            startMessage.addMessage(temp, "Lost Life");

            temp = new InGameMessage("Next Level!", "Fonts/Lindsey", new Vector2(70, 140), Color.Black);
            temp.displayMessage(false);
            startMessage.addMessage(temp, "Next Level");
        }
コード例 #3
0
 public async virtual void InGameMessageCall(Game game, InGameMessage im)
 {
     // Post message to Server Chatroom.
     await SignalRGameHub.Invoke("InGameMessageCall", game, im);
 }