Exemple #1
0
    void Update()
    {
        if (Input.GetKeyDown(KeyCode.Escape))
        {
            VHUtils.ApplicationQuit();
        }

        if (Input.GetKeyDown(KeyCode.Z))
        {
            GameObject.FindObjectOfType <DebugInfo>().NextMode();
        }
    }
Exemple #2
0
    void VHMsg_MessageEvent(object sender, VHMsgBase.Message message)
    {
        string [] splitargs = message.s.Split(" ".ToCharArray());

        if (splitargs.Length > 0)
        {
            if (splitargs[0] == "vrAllCall")
            {
                VHMsgBase.Get().SendVHMsg("vrComponent vhmsgemulator");
            }
            else if (splitargs[0] == "vrKillComponent")
            {
                if (splitargs.Length > 1)
                {
                    if (splitargs[1] == "vhmsgemulator" || splitargs[1] == "all")
                    {
                        VHUtils.ApplicationQuit();
                    }
                }
            }
        }
    }
Exemple #3
0
    void OnGUI()
    {
        float buttonH;

        if (Application.platform == RuntimePlatform.IPhonePlayer ||
            Application.platform == RuntimePlatform.Android)
        {
            buttonH = 70;
        }
        else
        {
            buttonH = 20;
        }

        Rect r = new Rect(0.25f, 0.2f, 0.5f, 0.6f);

        GUILayout.BeginArea(VHGUI.ScaleToRes(ref r));
        GUILayout.BeginVertical();

        if (m_loadingLevelStatus != null)
        {
            GUI.enabled = false;
        }

        if (GUILayout.Button("Start Level", GUILayout.Height(buttonH)))
        {
            StartCoroutine(LoadLevel("vhAssetsTestScene"));
        }

        if (GUILayout.Button("Mecanim Test", GUILayout.Height(buttonH)))
        {
            StartCoroutine(LoadLevel("mecanim"));
        }

        if (GUILayout.Button("Mecanim Web Test", GUILayout.Height(buttonH)))
        {
            StartCoroutine(LoadLevel("mecanimWeb"));
        }

        GUILayout.Space(40);

        if (GUILayout.Button("Exit", GUILayout.Height(buttonH)))
        {
            VHUtils.ApplicationQuit();
        }

        if (m_loadingLevelStatus != null)
        {
            GUI.enabled = true;
        }


        if (m_loadingLevelStatus != null)
        {
            GUILayout.Space(40);

            GUILayout.Label("Loading Level");

            GUILayout.Box("", GUILayout.Height(buttonH), GUILayout.Width(m_loadingLevelStatus.progress * r.width));
        }


        GUILayout.EndVertical();
        GUILayout.EndArea();
    }