コード例 #1
0
        private void PresentNextMessage()
        {
            _updateTimerTally = 0.0f;
            _currentStep      = NotificationStep.Appearing;

            _notificationImage.sprite = _sprite;
            _titleTextMesh.SetText(_title);
            _subTitleTextMesh.SetText(_message);

            switch (_style)
            {
            default:
            case NotificationStyle.Blue:
                _bgImage.color = new Color(52f / 255f, 31f / 255f, 151f / 255f);
                break;

            case NotificationStyle.Red:
                _bgImage.color = new Color(238f / 255f, 82f / 255f, 83f / 255f);
                break;

            case NotificationStyle.Yellow:
                _bgImage.color = new Color(254f / 255f, 202f / 255f, 87f / 255f);
                break;

            case NotificationStyle.Cerise:
                _bgImage.color = new Color(207f / 255f, 3f / 255f, 137f / 255f);
                break;
            }

            _requestedStart = false;
        }
コード例 #2
0
        public void DidActivate(bool firstActivation, bool addedToHierarchy, bool screenSystemEnabling)
        {
            _visibleInFirstPerson.Value    = _settings.isAvatarVisibleInFirstPerson;
            _resizeMode.Value              = _settings.resizeMode.value;
            _enableLocomotion.Value        = _settings.enableLocomotion;
            _floorHeightAdjust.Value       = _settings.floorHeightAdjust.value;
            _moveFloorWithRoomAdjust.Value = _settings.moveFloorWithRoomAdjust;
            _cameraNearClipPlane.Value     = _settings.cameraNearClipPlane;

            _armSpanLabel.SetText($"{_settings.playerArmSpan.value:0.00} m");

            _settings.resizeMode.changed += OnSettingsResizeModeChanged;
            _armSpanMeasurer.updated     += OnArmSpanMeasurementChanged;
            _armSpanMeasurer.completed   += OnArmSpanMeasurementCompleted;

            OnSettingsResizeModeChanged(_settings.resizeMode);
        }