Exemplo n.º 1
0
    public void MessageRecieved(string message)
    {
        //first check if message is slider value
        if (int.TryParse(message, out int value))
        {
            earthBehavior.SetAngle(value);
        }
        else
        {
            switch (message)
            {
            case "web":
                Debug.Log("Web");
                if (currDisplay != null)
                {
                    currDisplay.ToggleState();
                    earth.Close();
                }
                else
                {
                    CreateNewScreen();
                }
                break;

            case "arrow":
                //unparent screen here


                break;

            case "earth":
                earth.ToggleState();
                if (currDisplay != null)
                {
                    currDisplay.Close();
                }
                break;

            default:
                Debug.Log(message + " not recognized");
                break;
            }
        }
    }
Exemplo n.º 2
0
    public void MessageRecieved(string message)
    {
        //first check if message is slider value
        if (int.TryParse(message, out int value))
        {
            earthBehavior.SetAngle(value);
        }
        else
        {
            if (message == "arrow")
            {
                screenShare.ShareButtonPressed();
                return;
            }

            DisableOtherWindows(message);

            switch (message)
            {
            case "web":
                web.ToggleState();
                break;

            case "music":
                music.ToggleState();
                break;

            case "weather":
                weather.ToggleState();
                break;

            case "earth":
                earth.ToggleState();
                break;

            default:
                Debug.Log(message + " not recognized");
                break;
            }
        }
    }