예제 #1
0
 private void OnTriggerEnter(Collider other)
 {
     if (!buttonPushed)
     {
         if (other.tag == "Table")
         {
             return;
         }
         buttonObj.transform.localPosition = new Vector3(0, 1.35f, 0);
         if (sceneReloader)
         {
             FindObjectOfType <AdditiveSceneMethod.AdditiveSceneController>().CallReload(2);
         }
         else
         {
             if (!shownWindow)
             {
                 tutorialWindow.Show();
             }
             else
             {
                 tutorialWindow.Hide();
             }
             shownWindow = !shownWindow;
         }
     }
 }
예제 #2
0
    public override void OnInspectorGUI()
    {
        DrawDefaultInspector();
        GenericUIWindowScript myTarget = (GenericUIWindowScript)target;

        if (Application.isPlaying)
        {
            if (GUILayout.Button("Show"))
            {
                myTarget.Show();
            }

            if (GUILayout.Button("Hide"))
            {
                myTarget.Hide();
            }
        }
        else
        {
            if (GUILayout.Button("Enable play mode"))
            {
            }

            if (GUILayout.Button("Enable play mode"))
            {
            }
        }
    }