private void Inject(MirrorHelper mirrorHelper, Settings settings, PlayerAvatarManager avatarManager, FloorController floorController)
 {
     _mirrorHelper    = mirrorHelper;
     _settings        = settings;
     _avatarManager   = avatarManager;
     _floorController = floorController;
 }
 internal void Construct(DiContainer container, MirrorHelper mirrorHelper, Settings settings, PlayerAvatarManager avatarManager)
 {
     _container     = container;
     _mirrorHelper  = mirrorHelper;
     _settings      = settings;
     _avatarManager = avatarManager;
 }
示例#3
0
        protected override void DidActivate(bool firstActivation, ActivationType activationType)
        {
            _mirrorContainer = new GameObject();

            base.DidActivate(firstActivation, activationType);

            if (firstActivation)
            {
                StartCoroutine(MirrorHelper.SpawnMirror(kMirrorPosition, kMirrorRotation, kMirrorScale, _mirrorContainer.transform));
            }
        }
示例#4
0
        public void OnSceneLoaded(Scene newScene, LoadSceneMode mode)
        {
            if (_scenesManager == null)
            {
                _scenesManager = Resources.FindObjectsOfTypeAll <GameScenesManager>().FirstOrDefault();

                if (_scenesManager != null)
                {
                    _scenesManager.transitionDidFinishEvent += sceneTransitionDidFinish;
                    _scenesManager.transitionDidFinishEvent += SceneTransitionDidFinish;
                }
            }

            if (newScene.name == "MenuCore")
            {
                try
                {
                    MenuButtons.instance.RegisterButton(new MenuButton("Avatars", () =>
                    {
                        var mainFlowCoordinator = Resources.FindObjectsOfTypeAll <MainFlowCoordinator>().First();
                        var flowCoordinator     = new GameObject("AvatarListFlowCoordinator")
                                                  .AddComponent <AvatarListFlowCoordinator>();
                        mainFlowCoordinator.InvokePrivateMethod("PresentFlowCoordinator", flowCoordinator, null, true,
                                                                false);
                    }));
                }
                catch (Exception)
                {
                    logger.Warn("Failed to add menu button, spawning mirror instead");

                    _mirrorContainer = new GameObject();
                    GameObject.DontDestroyOnLoad(_mirrorContainer);
                    SharedCoroutineStarter.instance.StartCoroutine(MirrorHelper.SpawnMirror(new Vector3(0, 0, -1.5f), Quaternion.Euler(-90f, 180f, 0), new Vector3(0.50f, 1f, 0.25f), _mirrorContainer.transform));
                }
            }
        }
示例#5
0
 private void Inject(MirrorHelper mirrorHelper, Settings settings, PlayerAvatarManager avatarManager)
 {
     _mirrorHelper  = mirrorHelper;
     _settings      = settings;
     _avatarManager = avatarManager;
 }
示例#6
0
 private void Inject(MirrorHelper mirrorHelper, Settings settings)
 {
     _mirrorHelper = mirrorHelper;
     _settings     = settings;
 }