Inheritance: MonoBehaviour
Ejemplo n.º 1
0
    // Use this for initialization
    void Start()
    {
        GetComponent <Text> ().enabled = false;
        Type   = GetComponent <AudioSource> ();
        D_Menu = GameObject.FindGameObjectWithTag("Draw");
        DrawT  = D_Menu.GetComponent <Draw_Script> ();

        W_Ele  = GameObject.FindGameObjectWithTag("Draw2");
        DrawW  = W_Ele.GetComponent <Draw_Script> ();
        Menu   = GameObject.FindGameObjectWithTag("Menu");
        Menu_S = Menu.GetComponent <Menu_Script> ();
    }
Ejemplo n.º 2
0
    void Awake()
    {
        instance = this;

        for (int i = 0; i < menu_window.Length; i++)
        {
            //Gets all rect transform and canvas group inside the windwo_menu array
            menu_rects.Add(menu_window [i].GetComponent <RectTransform> ());
            menu_canvases.Add(menu_window [i].GetComponent <CanvasGroup> ());
            //Centers all objects here
            menu_rects [i].offsetMax = menu_rects [i].offsetMin = Vector3.zero;
            //Makes all canvases invisible on awake
            menu_canvases [i].alpha = 0.0f;
            //menu_canvases [i].interactable = false;
            menu_window[i].SetActive(false);
        }

        menu_window [0].SetActive(true);
        menu_canvases [0].alpha        = 1.0f;
        menu_canvases [0].interactable = true;
        current_screen = 0;
    }
Ejemplo n.º 3
0
 /*  //Do this when the selectable UI object is selected.
  * public void OnSelect(BaseEventData eventData)
  * {
  *
  *        if (EditorPrefs.GetBool("FmodOn"))
  *        {
  *            string eventPath = "event:/SFX/MenuButtonsChange";
  *            if (EditorPrefs.GetBool("FmodOn") && FMOD_Debug.CheckFmodEvent(eventPath))
  *            {
  *                RuntimeManager.PlayOneShot(eventPath, transform.position);
  *            }
  *        }
  *
  * }*/
 private void Start()
 {
     menu = GetComponent <Menu_Script>();
 }