Exemple #1
0
    // Use this for initialization
    void Start()
    {
        BLight = GameObject.Find("BedLight");
        BLight.GetComponent <VirtualButtonBehaviour> ().RegisterEventHandler(this);
        BLight.SetActive(true);
        BFan = GameObject.Find("BedFan");
        BFan.GetComponent <VirtualButtonBehaviour> ().RegisterEventHandler(this);
        BFan.SetActive(true);
        back = GameObject.Find("back");
        back.GetComponent <VirtualButtonBehaviour> ().RegisterEventHandler(this);
        back.SetActive(true);

        cli.Connect("192.168.137.21", 80);
    }
Exemple #2
0
    // Use this for initialization
    void Start()
    {
        HallButt = GameObject.Find("Hall").gameObject;
        HallButt.GetComponent <VirtualButtonBehaviour> ().RegisterEventHandler(this);
        HallButt.SetActive(true);
        BedButt = GameObject.Find("BedRoom");
        BedButt.GetComponent <VirtualButtonBehaviour> ().RegisterEventHandler(this);
        BedButt.SetActive(true);
        HLight = GameObject.Find("HallLight");
        HLight.GetComponent <VirtualButtonBehaviour> ().RegisterEventHandler(this);
        HLight.SetActive(false);
        HFan = GameObject.Find("HallFan");
        HFan.GetComponent <VirtualButtonBehaviour> ().RegisterEventHandler(this);
        HFan.SetActive(false);
        BLight = GameObject.Find("BedLight");
        BLight.GetComponent <VirtualButtonBehaviour> ().RegisterEventHandler(this);
        BLight.SetActive(false);
        BFan = GameObject.Find("BedFan");
        BFan.GetComponent <VirtualButtonBehaviour> ().RegisterEventHandler(this);
        BFan.SetActive(false);

        cli.Connect("172.16.16.187", 80);
    }