示例#1
0
文件: Data.cs 项目: pontura/vaccineGo
    void OnInput(InputManagerPontura.types type)
    {
        print("_ " + type + " isDone: " + isDone + " timer: " + timer);
        switch (type)
        {
        case InputManagerPontura.types.SWIPE_RIGHT:
            if (!isDone)
            {
                SwipeRight();
            }
            break;

        case InputManagerPontura.types.SWIPE_LEFT:
            if (!isDone)
            {
                SwipeLeft();
            }
            break;

        case InputManagerPontura.types.GATILLO_DOWN:
            if (!isDone && timer > 3)
            {
                if (num_of_vaccines == 0)
                {
                    PersistentData.Instance.gameSettings = PersistentData.GameSettings.Kids;
                    Events.LoadScene("LangSelector");
                }
                else
                {
                    StartCoroutine(Done());
                }
            }
            break;

        case InputManagerPontura.types.TWO_BUTTONS_DOWN:
            if (timer > 1)
            {
                PersistentData.Instance.gameSettings = PersistentData.GameSettings.Adults;
                Events.LoadScene("Adults");
            }
            break;
        }
    }
示例#2
0
    void OnInput(InputManagerPontura.types type)
    {
        switch (type)
        {
        case InputManagerPontura.types.SWIPE_LEFT:
            ChangeLang(true);
            break;

        case InputManagerPontura.types.SWIPE_RIGHT:
            ChangeLang(false);
            break;

        case InputManagerPontura.types.GATILLO_DOWN:
            VoicesManager.Instance.PlayAudio(0, "ok");
            GoToGame();
            Destroy(this);
            break;
        }
    }
示例#3
0
    void OnInput(InputManagerPontura.types type)
    {
        if (data != null && type == InputManagerPontura.types.PAD_DOWN && data.state != Data.states.DONE)
        {
            PersistentData.Instance.langSelected = false;
            ResetScene();
            return;
        }

        if (!started)
        {
            return;
        }


        //		if(type == InputManager.types.GATILLO_HOLD)
        //		{
        //			SoundFXManager.Instance.OnSoundFX ("reset");
        //			UnityEngine.XR.InputTracking.Recenter();
        //		}
        if (type == InputManagerPontura.types.PAD_DOWN)
        {
            Pause = !Pause;
            if (_pause)
            {
                SoundFXManager.Instance.OnSoundFX("unpause");
            }
            else
            {
                SoundFXManager.Instance.OnSoundFX("pause");
            }
        }        // else if(type == InputManager.types.PAD_HOLD)
                 //{
        //  ResetScene ();
        //}
    }