Commit 6015262 1 parent 5e26440 commit 6015262 Copy full SHA for 6015262
File tree 4 files changed +10
-8
lines changed
Assets.Scripts.UI.TitleScreen
4 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -168,7 +168,9 @@ public class GameSystem : MonoBehaviour
168
168
// Set to True to ignore normal gameplay inputs:
169
169
// - Disables normal inputs (e.g to advance text) in main GameSystem loop
170
170
// - Disables some GUI inputs by manually added checks in each button type
171
- public bool MODIgnoreInputs ;
171
+ private bool _MODIgnoreInputs ;
172
+ public bool MODIgnoreInputs ( ) => _MODIgnoreInputs ;
173
+ public void SetMODIgnoreInputs ( bool value ) => _MODIgnoreInputs = value ;
172
174
173
175
// Unity will attempt to deserialize public properties and these aren't in the AssetBundle,
174
176
// so use private ones with public accessors
@@ -853,7 +855,7 @@ private void Update()
853
855
{
854
856
if ( blockInputTime <= 0f )
855
857
{
856
- if ( ( CanInput || GameState != GameState . Normal ) && ( MODIgnoreInputs || inputHandler == null || ! inputHandler ( ) ) )
858
+ if ( ( CanInput || GameState != GameState . Normal ) && ( MODIgnoreInputs ( ) || inputHandler == null || ! inputHandler ( ) ) )
857
859
{
858
860
return ;
859
861
}
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ private void OnClick()
23
23
{
24
24
gameSystem = GameSystem . Instance ;
25
25
}
26
- if ( gameSystem . MODIgnoreInputs )
26
+ if ( gameSystem . MODIgnoreInputs ( ) )
27
27
{
28
28
return ;
29
29
}
@@ -106,7 +106,7 @@ private void Awake()
106
106
107
107
private void LateUpdate ( )
108
108
{
109
- button . isEnabled = ! GameSystem . Instance . MODIgnoreInputs ;
109
+ button . isEnabled = ! GameSystem . Instance . MODIgnoreInputs ( ) ;
110
110
}
111
111
}
112
112
}
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ private void OnClick()
29
29
{
30
30
GameSystem gameSystem = GameSystem . Instance ;
31
31
32
- if ( gameSystem . MODIgnoreInputs ) { return ; }
32
+ if ( gameSystem . MODIgnoreInputs ( ) ) { return ; }
33
33
34
34
if ( gameSystem . GameState == GameState . TitleScreen && ! ( time > 0f ) && UICamera . currentTouchID == - 1 )
35
35
{
@@ -105,7 +105,7 @@ private void Awake()
105
105
106
106
private void LateUpdate ( )
107
107
{
108
- button . isEnabled = ( ! GameSystem . Instance . MODIgnoreInputs && GameSystem . Instance . GameState == GameState . TitleScreen && ! IsLeaving ) ;
108
+ button . isEnabled = ( ! GameSystem . Instance . MODIgnoreInputs ( ) && GameSystem . Instance . GameState == GameState . TitleScreen && ! IsLeaving ) ;
109
109
if ( ! isReady && time < 0f )
110
110
{
111
111
if ( ! button . enabled )
Original file line number Diff line number Diff line change @@ -344,7 +344,7 @@ public void Show()
344
344
{
345
345
void ForceShow ( )
346
346
{
347
- gameSystem . MODIgnoreInputs = true ;
347
+ gameSystem . SetMODIgnoreInputs ( true ) ;
348
348
gameSystem . HideUIControls ( ) ;
349
349
this . visible = true ;
350
350
}
@@ -397,7 +397,7 @@ public void UserToggleVisibility()
397
397
public void ForceHide ( )
398
398
{
399
399
this . visible = false ;
400
- gameSystem . MODIgnoreInputs = false ;
400
+ gameSystem . SetMODIgnoreInputs ( false ) ;
401
401
gameSystem . ShowUIControls ( ) ;
402
402
}
403
403
You can’t perform that action at this time.
0 commit comments