예제 #1
0
    void OnSliderChangeRequest(KnobHandler.SliderLevels levels)
    {
        VentanaRequestFactory requestFactory = VentanaRequestFactory.Instance;

        Debug.Log("Requesting a: " + levels.XAxisLevel + (levels.XAxisLevel > 0 ? " increase" : " decrease"));
        int baseLevel = levels.XAxisLevel * brightnessMultipler;

        StartCoroutine(requestFactory.PostToLightAPIEndpoint(brightCommand, VentanaID, baseLevel.ToString()));
    }
    void makeAPIRequest(string child)
    {
        VentanaRequestFactory requestFactory = VentanaRequestFactory.Instance;

        switch (child)
        {
        case "Toggle0":
            Debug.Log("Toggled 0");
            StartCoroutine(requestFactory.PostToLightAPIEndpoint(poweredCommand, VentanaID, "0"));
            break;

        case "Toggle1":
            Debug.Log("Toggled 1");
            StartCoroutine(requestFactory.PostToLightAPIEndpoint(poweredCommand, VentanaID, "1"));
            break;

        default:
            break;
        }
    }
예제 #3
0
    void makeAPIRequest(string child)
    {
        VentanaRequestFactory requestFactory = VentanaRequestFactory.Instance;

        switch (child)
        {
        case "light":
            StartCoroutine(requestFactory.PostToLightAPIEndpoint(poweredCommand, VentanaID, ""));
            break;

        default:
            break;
        }
    }