コード例 #1
0
    /// <summary>
    /// This function will send a command to the multiplayer component
    /// </summary>
    /// <param name="command"></param>
    public void sendCommand(ICouchGamesCommand command)
    {
        Console.WriteLine("Command coming");
        switch (command.getCommandType())
        {
        case CouchGamesCommandType.Broadcast:
            server.sendToAll(command);
            break;

        case CouchGamesCommandType.ForHost:
            server.sendToHost(command);
            break;

        default:
            throw new InvalidEnumArgumentException();
        }
    }