Exemple #1
0
        protected override void OnRegistered()
        {
            containerTransform = GameObject.FindGameObjectWithTag(containerTag).transform;

            lobbyScreen  = Instantiate(lobbyScreenPrototype, containerTransform);
            battleScreen = Instantiate(battleScreenPrototype, containerTransform);

            lobbyScreen.Initialize(screenController);
            battleScreen.Initialize(screenController);
        }
Exemple #2
0
        protected override void OnRegistered()
        {
            container = GameObject.FindGameObjectWithTag(containerTag).GetComponent <InterfaceContainer>();
            container.Register();

            lobbyScreen  = Instantiate(lobbyScreenPrototype, container.Root);
            battleScreen = Instantiate(battleScreenPrototype, container.Root);

            lobbyScreen.Initialize(screenController);
            battleScreen.Initialize(screenController);
        }
Exemple #3
0
        protected override void OnUnregister()
        {
            lobbyScreen.Deinitialize(screenController);
            battleScreen.Deinitialize(screenController);

            Destroy(lobbyScreen);
            Destroy(battleScreen);

            lobbyScreen        = null;
            battleScreen       = null;
            containerTransform = null;
        }