Ejemplo n.º 1
0
        public string FakePressPlay()
        {
            FakePressButton fakePressButton = GetPlayButton().GetComponent <FakePressButton>();

            if (fakePressButton == null)
            {
                fakePressButton = GetPlayButton().gameObject.AddComponent <FakePressButton>();
            }
            return(fakePressButton.PressButton());
        }
Ejemplo n.º 2
0
        public string FakePressRandomButton()
        {
            if (pressableButtons == null)
            {
                pressableButtons = GetComponentsInChildren <PressableButtonHoloLens2>();
            }
            PressableButtonHoloLens2 button = pressableButtons[Random.Range(0, pressableButtons.Length)];
            FakePressButton          fbp    = button.GetComponent <FakePressButton>();

            if (fbp == null)
            {
                fbp = button.gameObject.AddComponent <FakePressButton>();
            }
            return(fbp.PressButton());
        }
Ejemplo n.º 3
0
        string SpawnVariable()
        {
            string[] varNames = GetComponent <Exercise>().varNames;
            if (varNames.Length == 0)
            {
                return("");
            }
            string          varToSpawn = varNames[Random.Range(0, varNames.Length)];
            FakePressButton fpb        = MemoryManager.instance.GetVariables()[varToSpawn].GetComponent <FakePressButton>();

            if (fpb == null)
            {
                fpb = MemoryManager.instance.GetVariables()[varToSpawn].gameObject.AddComponent <FakePressButton>();
            }
            return(fpb.PressButton());
        }