Esempio n. 1
0
    //int HL=0,HF=0,BL=0,BF=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);


        cli.Connect("192.168.137.21", 80);
    }
Esempio n. 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);
    }