Esempio n. 1
0
    public void CmdTVServerExec(TVCommand cmd, ContentType type, string arg)
    {
        print("cmd=" + cmd + "type=" + type + "arg" + arg);
        NetController ctrl = FindObjectOfType <NetController>();

        if (ctrl != null)
        {
            if (cmd == TVCommand.StartGame)
            {
                ctrl.GameStart(type, arg);
            }
            else if (cmd == TVCommand.StopGame)
            {
                ctrl.GameStop(type, arg);
            }
            else if (cmd == TVCommand.ResetGame)
            {
                ctrl.GameReset(type, arg);
            }
            else if (cmd == TVCommand.BroadcastYes)
            {
                ctrl.ToggleBroadcast(true);
            }
            else if (cmd == TVCommand.BroadcastNo)
            {
                ctrl.ToggleBroadcast(false);
            }
        }
    }