Beispiel #1
0
    void Start()
    {
        button = GetComponentInChildren <Button>();
        button.onClick.AddListener(() => OnClick());

        GameObject obj = GameObject.FindGameObjectWithTag("ForegroundUI");

        foreground = obj.GetComponentInChildren <Animator>();
        contFore   = obj.GetComponentInChildren <ControllerForeground>();
    }
Beispiel #2
0
    private void OnEnable()
    {
        GameObject obj = GameObject.FindGameObjectWithTag("ForegroundUI");

        foreground = obj.GetComponentInChildren <Animator>();
        contFore   = obj.GetComponentInChildren <ControllerForeground>();

        contFore.FadeInEvent += EndApplication;
        foreground.SetTrigger("FadeOut");
    }
Beispiel #3
0
    private void OnEnable()
    {
        GameObject obj = GameObject.FindGameObjectWithTag("ForegroundUI");

        foreground = obj.GetComponentInChildren <Animator>();
        contFore   = obj.GetComponentInChildren <ControllerForeground>();

        contFore.FadeInEvent += BackToMenu;
        foreground.SetTrigger("FadeOut");

        obj       = GameObject.FindGameObjectWithTag("TransitionData");
        transData = obj.GetComponentInChildren <DataTransition>();
    }
Beispiel #4
0
    private void Start()
    {
        button = GetComponentInChildren <Button>();
        button.onClick.AddListener(() => OnButtonPress());

        GameObject obj = GameObject.FindGameObjectWithTag("ForegroundUI");

        foreground = obj.GetComponentInChildren <Animator>();
        contFore   = obj.GetComponentInChildren <ControllerForeground>();

        obj            = GameObject.FindGameObjectWithTag("TransitionData");
        dataTransition = obj.GetComponentInChildren <DataTransition>();
    }
Beispiel #5
0
    private void AssignValues()
    {
        transitionData = GameObject.FindGameObjectWithTag("TransitionData")
                                        .GetComponentInChildren<DataTransition>();

        globalMusic = GameObject.FindGameObjectWithTag("GlobalMusic");
        momentDisplayCont = GameObject.FindGameObjectWithTag("MomentDisplayController");

        GameObject obj = GameObject.FindGameObjectWithTag("ForegroundUI");
        if(obj != null)
        {
            foreground = obj.GetComponentInChildren<Animator>();
            contFore = obj.GetComponentInChildren<ControllerForeground>();
        }        
    }