public override void ClientDeinitialize(ICharacter character)
 {
     if (character.IsCurrentClientCharacter)
     {
         // reset game
         BootstrapperClientGame.Init(null);
     }
 }
Esempio n. 2
0
 public override void ClientDeinitialize(ICharacter character)
 {
     if (character.IsCurrentClientCharacter)
     {
         // reset
         BootstrapperClientGame.Init(null);
         EditorActiveToolManager.Deactivate();
     }
 }
Esempio n. 3
0
 public override void ClientDeinitialize(ICharacter character)
 {
     if (character.IsCurrentClientCharacter)
     {
         // reset game
         BootstrapperClientGame.Init(null);
         WindowRespawn.EnsureClosed();
     }
 }
Esempio n. 4
0
        protected override void ClientInitialize(ClientInitializeData data)
        {
            var character = data.GameObject;

            if (!character.IsCurrentClientCharacter)
            {
                return;
            }

            BootstrapperClientGame.Init(character);
            character.ClientSceneObject
            .AddComponent <ComponentPlayerInputUpdater>()
            .Setup(character);

            ClientPostEffectsManager.IsPostEffectsEnabled = false;
            //ClientTileBlendHelper.IsBlendingEnabled = false;
            ClientTileDecalHelper.IsDecalsEnabled = false;
        }
Esempio n. 5
0
        private void ClientInitializeCurrentCharacter(ClientInitializeData data)
        {
            var character    = data.GameObject;
            var privateState = data.PrivateState;
            var publicState  = data.PublicState;

            this.ServerRebuildFinalCacheIfNeeded(privateState, publicState);

            var sceneObject = character.ClientSceneObject;

            sceneObject
            .AddComponent <ComponentPlayerInputUpdater>()
            .Setup(character);

            sceneObject
            .AddComponent <ComponentAmbientSoundManager>();

            BootstrapperClientGame.Init(character);

            // add current public action progress display/watcher
            sceneObject
            .AddComponent <ClientComponentActionWithProgressWatcher>()
            .Setup(privateState);

            // add skills watcher
            sceneObject
            .AddComponent <ClientComponentSkillsWatcher>()
            .Setup(privateState);

            // add technologies watcher
            sceneObject
            .AddComponent <ClientComponentTechnologiesWatcher>()
            .Setup(privateState);

            CurrentCharacterInputHistory.Instance.Clear();

            this.CallServer(_ => _.ServerRemote_ResetLastInputAck());

            // re-select hotbar slot
            SharedSelectHotbarSlotId(character, privateState.SelectedHotbarSlotId, isByPlayer: false);

            WindowRespawn.EnsureClosed();
        }