Ejemplo n.º 1
0
        private void Start()
        {
            // test
            goBum = GameObject.Find("oeBum");
            if (typeReactor == TR.lightR)
            {
                stav = true; oeLight1 = GameObject.Find("oeLight1").GetComponent <Light>();
            }
            if (typeReactor == TR.soundR)
            {
                stav = true; oeAudio1 = GameObject.Find("oeAudio");
            }
            //if (typeReactor == TR.toolsR) oeTools = GameObject.Find("oeTools");
            oeTools  = GameObject.Find("oeTools");  //oeTools.SetActive(false);
            oeToolsL = GameObject.Find("oeToolsL"); // oeToolsL.SetActive(false);
            oeToolsR = GameObject.Find("oeToolsR"); //oeToolsR.SetActive(false);


            myLed.SetActive(stav);

            buttonEvents = GetComponent <VRTK_Button_UnityEvents>();
            if (buttonEvents == null)
            {
                buttonEvents = gameObject.AddComponent <VRTK_Button_UnityEvents>();
            }
            buttonEvents.OnPushed.AddListener(handlePush);
        }
Ejemplo n.º 2
0
 private void Start()
 {
     buttonEvents = GetComponent <VRTK_Button_UnityEvents>();
     if (buttonEvents == null)
     {
         buttonEvents = gameObject.AddComponent <VRTK_Button_UnityEvents>();
     }
     buttonEvents.OnPushed.AddListener(handlePush);
 }
Ejemplo n.º 3
0
 private void Start()
 {
     buttonEvents_ = GetComponent <VRTK_Button_UnityEvents>();
     if (buttonEvents_ == null)
     {
         buttonEvents_ = gameObject.AddComponent <VRTK_Button_UnityEvents>();
     }
     buttonEvents_.OnPushed.AddListener(HandleButtonPushed);
 }
Ejemplo n.º 4
0
    void Start()
    {
        _events = GetComponent <VRTK_Button_UnityEvents>();
        if (_events == null)
        {
            _events = gameObject.AddComponent <VRTK_Button_UnityEvents>();
        }

        _events.OnPushed.AddListener(BtnPushed);
    }
Ejemplo n.º 5
0
        private void Start()
        {
            game_c = GameObject.Find("GameControl");
            gc     = game_c.GetComponent <GameControl> ();

            buttonEvents = GetComponent <VRTK_Button_UnityEvents>();
            if (buttonEvents == null)
            {
                buttonEvents = gameObject.AddComponent <VRTK_Button_UnityEvents>();
            }
            buttonEvents.OnPushed.AddListener(handle_reject_push);
        }
Ejemplo n.º 6
0
        private void Start()
        {
            game_c = GameObject.Find("GameControl");

            Debug.Log(game_c);
            Debug.Log("about to print 'genome");
            gc = game_c.GetComponent <GameControl> ();

            buttonEvents = GetComponent <VRTK_Button_UnityEvents>();
            if (buttonEvents == null)
            {
                buttonEvents = gameObject.AddComponent <VRTK_Button_UnityEvents>();
            }
            buttonEvents.OnPushed.AddListener(handle_save_push);
        }
Ejemplo n.º 7
0
        private void Start()
        {
            try
            {
                buttonEvents = GetComponent <VRTK_Button_UnityEvents>();
                if (buttonEvents == null)
                {
                    buttonEvents = gameObject.AddComponent <VRTK_Button_UnityEvents>();
                }
                buttonEvents.OnPushed.AddListener(handlePush);
            } catch (Exception e)
            {
                Debug.LogWarning("" + e.Message.ToString());
            }


            //initial reset
            handlePush(new object(), new Control3DEventArgs());
        }