Exemplo n.º 1
0
    public void NextLevel()
    {
        if (mode == 0)
        {
            mode++;
            panel.text        = "LOW";
            status.sprite     = heatOn;
            dial.image.sprite = low;
        }
        else if (mode == 1)
        {
            mode++;
            panel.text        = "MEDIUM";
            status.sprite     = heatOn;
            dial.image.sprite = medium;
        }
        else if (mode == 2)
        {
            mode++;
            panel.text        = "HIGH";
            status.sprite     = heatOn;
            dial.image.sprite = high;
        }
        else if (mode == 3)
        {
            mode              = 0;
            panel.text        = "OFF";
            status.sprite     = heatOff;
            dial.image.sprite = off;
        }

        // updates all other user's oven
        CurrentOven.GetComponent <Oven>().photonView.RPC("ChangeMode", PhotonTargets.AllBuffered, mode);
    }