Пример #1
0
        private void ForceSleep()
        {
            DisableActiveState();

            // Force disable passive.
            if (activeSouvenirManager != null)
            {
                activeSouvenirManager.MakeInactive(this);
            }

            activeStateVisuals.SetActive(false);
            state = SouvenirState.Off;
            PassiveStateDisabled.RaiseEvent();
        }
Пример #2
0
        /// <summary>
        /// Disables the souvenir, puts it in sleeping state.
        /// </summary>
        private void DisablePassiveState()
        {
            if (!CanDisablePassive)
            {
                return;
            }

            if (activeSouvenirManager != null)
            {
                activeSouvenirManager.MakeInactive(this);
            }

            activeStateVisuals.SetActive(false);
            state = SouvenirState.Off;
            PassiveStateDisabled.RaiseEvent();
        }