public void ToggleEvent()
    {
        StartCoroutine(IftttMakerManager.Request(isOn ? offEventName : onEventName));
        isOn = !isOn;

        foreach (var item in ChildrenSmartHomeToggleParents)
        {
            var script = item.GetComponent <SmartHomeToggleButtonScript>();
            if (script != null)
            {
                script.isOn = isOn;
            }
        }
    }
예제 #2
0
 public void TriggerEvent(string eventName)
 {
     Debug.Log(eventName + " called.");
     StartCoroutine(IftttMakerManager.Request(eventName));
 }