Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ MonoBehaviour:
m_Metadata:
m_Items: []
- m_Id: 483635457687552
m_Key: Camera_Control_Reverse
m_Key: Input_Controls_Hold
m_Metadata:
m_Items: []
- m_Id: 485408155107328
Expand Down Expand Up @@ -201,6 +201,18 @@ MonoBehaviour:
m_Key: Reset
m_Metadata:
m_Items: []
- m_Id: 6347372679405568
m_Key: Crouch_Controls
m_Metadata:
m_Items: []
- m_Id: 6348878405181440
m_Key: Input_Controls_Toggle
m_Metadata:
m_Items: []
- m_Id: 6433956510572544
m_Key: Sprint_Controls
m_Metadata:
m_Items: []
m_Metadata:
m_Items: []
m_KeyGenerator:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ MonoBehaviour:
m_Metadata:
m_Items: []
- m_Id: 483635457687552
m_Localized: Reverse
m_Localized: Hold
m_Metadata:
m_Items: []
- m_Id: 485408155107328
Expand Down Expand Up @@ -202,6 +202,18 @@ MonoBehaviour:
m_Localized: Reset
m_Metadata:
m_Items: []
- m_Id: 6347372679405568
m_Localized: Crouch Controls
m_Metadata:
m_Items: []
- m_Id: 6348878405181440
m_Localized: Toggle
m_Metadata:
m_Items: []
- m_Id: 6433956510572544
m_Localized: Sprint Controls
m_Metadata:
m_Items: []
references:
version: 2
RefIds: []
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ MonoBehaviour:
m_Metadata:
m_Items: []
- m_Id: 483635457687552
m_Localized: "\u30EA\u30D0\u30FC\u30B9"
m_Localized: "\u30DB\u30FC\u30EB\u30C9"
m_Metadata:
m_Items: []
- m_Id: 485408155107328
Expand Down Expand Up @@ -202,6 +202,18 @@ MonoBehaviour:
m_Localized: "\u30EA\u30BB\u30C3\u30C8"
m_Metadata:
m_Items: []
- m_Id: 6347372679405568
m_Localized: "\u3057\u3083\u304C\u307F\u64CD\u4F5C"
m_Metadata:
m_Items: []
- m_Id: 6348878405181440
m_Localized: "\u30C8\u30B0\u30EB"
m_Metadata:
m_Items: []
- m_Id: 6433956510572544
m_Localized: "\u30B9\u30D7\u30EA\u30F3\u30C8\u64CD\u4F5C"
m_Metadata:
m_Items: []
references:
version: 2
RefIds: []
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public async Task Load_WhenNoFile_CreatesDefaultData()
await LoadDefaultData();

Assert.That(_service.Data, Is.Not.Null);
Assert.That(_service.Data.Version, Is.EqualTo(2));
Assert.That(_service.Data.Version, Is.EqualTo(1));
Assert.That(_service.Data.LanguageCode, Is.EqualTo("ja"));
Assert.That(_service.Data.InputBindingOverridesJson, Is.EqualTo(""));
Assert.That(_service.Data.CameraFov, Is.EqualTo(60f));
Expand Down Expand Up @@ -188,7 +188,7 @@ public void Serialization_RoundTrip_PreservesAllProperties()
CameraControlVertical = true,
CameraSensitivityHorizontal = 2.5f,
CameraSensitivityVertical = 0.5f,
CameraAcceleration = 1.5f,
CameraAcceleration = 15f,
CameraShake = 0.25f,
CameraFov = 100f,
DisplayMode = FullScreenMode.ExclusiveFullScreen,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public override UniTask Startup()

SceneComponent.Initialize(Options);

// General
// Gameplay
SceneComponent.OnLanguageChanged
.Subscribe(code =>
{
Expand Down Expand Up @@ -97,7 +97,14 @@ public override UniTask Startup()
.Subscribe(v => { _optionSaveService.SetCameraFov(v); })
.AddTo(Disposables);

// Display
SceneComponent.OnSprintModeChanged
.Subscribe(b => { _optionSaveService.SetSprintToggle(b); })
.AddTo(Disposables);
SceneComponent.OnCrouchModeChanged
.Subscribe(b => { _optionSaveService.SetCrouchToggle(b); })
.AddTo(Disposables);

// Graphics
SceneComponent.OnDisplayModeChanged
.Subscribe(mode =>
{
Expand Down Expand Up @@ -134,7 +141,7 @@ public override UniTask Startup()
})
.AddTo(Disposables);

// Input(キーリバインド)
// Controls(キーリバインド)
foreach (var rebindView in SceneComponent.RebindViews)
{
var rebind = rebindView;
Expand Down Expand Up @@ -255,6 +262,9 @@ public class HorrorOptionDialogComponent : GameSceneComponent
[SerializeField] private SliderValueSelector _cameraShake;
[SerializeField] private SliderValueSelector _cameraFov;

[SerializeField] private SliderBooleanSelector _sprintMode;
[SerializeField] private SliderBooleanSelector _crouchMode;

[Header("Options - Graphics")]
[SerializeField] private SliderIndexSelector _displayMode;
[SerializeField] private GenericValues<FullScreenMode> _displayModeValues;
Expand Down Expand Up @@ -285,6 +295,8 @@ public class HorrorOptionDialogComponent : GameSceneComponent

public Observable<bool> OnCameraControlHorizontalChanged => _cameraControlHorizontal.OnValueChanged;
public Observable<bool> OnCameraControlVerticalChanged => _cameraControlVertical.OnValueChanged;
public Observable<bool> OnSprintModeChanged => _sprintMode.OnValueChanged;
public Observable<bool> OnCrouchModeChanged => _crouchMode.OnValueChanged;
public Observable<float> OnCameraSensitivityHorizontalChanged => _cameraSensitivityHorizontal.OnValueChanged;
public Observable<float> OnCameraSensitivityVerticalChanged => _cameraSensitivityVertical.OnValueChanged;
public Observable<float> OnCameraAccelerationChanged => _cameraAcceleration.OnValueChanged;
Expand Down Expand Up @@ -329,7 +341,7 @@ public void Initialize(HorrorOptionSaveData d)
{
_tabGroup.Initialize();

// General
// Gameplay
_language.SetIndex(_languageValues[d.LanguageCode]);
_cameraControlHorizontal.SetBool(d.CameraControlHorizontal);
_cameraControlVertical.SetBool(d.CameraControlVertical);
Expand All @@ -339,6 +351,9 @@ public void Initialize(HorrorOptionSaveData d)
_cameraShake.SetValue(d.CameraShake);
_cameraFov.SetValue(d.CameraFov);

_crouchMode.SetBool(d.CrouchToggle);
_sprintMode.SetBool(d.SprintToggle);

// Display
_displayMode.SetIndex(_displayModeValues[d.DisplayMode]);
_resolution.SetIndex(ResolveResolutionIndex(d.ResolutionWidth, d.ResolutionHeight));
Expand Down
Loading
Loading