public static ModalPanelMakeChoice Instance()
    {
        if (!modalPanel)
        {
            modalPanel = FindObjectOfType(typeof(ModalPanelMakeChoice)) as ModalPanelMakeChoice;
            if (!modalPanel)             // Make sure that Modalpanel existes.
            {
                Debug.Log("There needs to be one active ModalPanelMakeChoice Script on a GameObject in your scene");
            }
        }

        return(modalPanel);
    }
示例#2
0
 void Start()
 {
     gameObject.GetComponent <AudioController> ().PlayBackground();
     gameSetupL      = GameSetupLanguages.Instance();
     makeChoicePanel = ModalPanelMakeChoice.Instance();
 }