public void ConStruct()
    {
        transitionObject = GameObject.Instantiate <ScreenTransitionObject>(Resources.Load <ScreenTransitionObject>("UI/TransitionScreen"));
        ConfactoryTools.SetObjectWithConGameObjectSettings(transitionObject.gameObject);
        transitionObject.FadeInCompleteEvent -= FadeInComplete;
        transitionObject.FadeInCompleteEvent += FadeInComplete;


        transitionObject.FadeOutCompleteEvent -= FadeOutComplete;
        transitionObject.FadeOutCompleteEvent += FadeOutComplete;
    }
Beispiel #2
0
    public IConfactory ConStruct(IConfactoryFinder confactoryFinder)
    {
        ScreenTransitionObject stoResource = Resources.Load <ScreenTransitionObject>("UI/TransitionScreen");

        if (stoResource == null)
        {
            Debug.LogWarning("No TransitionScreen found at 'Resources/UI/TransitionScreen'. Using Default screen instead");
            stoResource = Resources.Load <ScreenTransitionObject>("ConfactoryResources/ScreenSwitching/TransitionScreen");
        }

        transitionObject = GameObject.Instantiate <ScreenTransitionObject>(stoResource);
        ConfactoryTools.SetObjectWithConGameObjectSettings(transitionObject.gameObject);
        transitionObject.FadeInCompleteEvent -= FadeInComplete;
        transitionObject.FadeInCompleteEvent += FadeInComplete;


        transitionObject.FadeOutCompleteEvent -= FadeOutComplete;
        transitionObject.FadeOutCompleteEvent += FadeOutComplete;
        return(null);
    }