Skip to content

Commit aeaf57a

Browse files
committed
Tweaked DemoConfiguration
1 parent 217a5b7 commit aeaf57a

File tree

3 files changed

+28
-16
lines changed

3 files changed

+28
-16
lines changed

Assets/Resources/DemoConfig.asset

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,12 @@ MonoBehaviour:
1212
m_Script: {fileID: 11500000, guid: dd9ba42fbcfea443dae0540ef0f44176, type: 3}
1313
m_Name: DemoConfig
1414
m_EditorClassIdentifier:
15-
Enabled: 1
16-
ApiUrl: https://sentaur-leaderboard-f7z2cjcdzq-uc.a.run.app
17-
User:
15+
_enabled: 0
16+
_apiUrl: https://sentaur-leaderboard-f7z2cjcdzq-uc.a.run.app
17+
_user:
1818
Username: sentaur_gdc
1919
Password: survivor_whatsmyageagain42_survivor
20-
AutoPlay: 1
21-
CheatingButtons: 0
22-
NotHotDogParticleEffect: 1
23-
FetchUpgradeFromServer: 1
24-
CrashOnGameOver: 1
20+
_autoPlay: 1
21+
_notHotDogParticleEffect: 1
22+
_fetchUpgradeFromServer: 1
23+
_crashOnGameOver: 1

Assets/Scripts/Config/DemoConfiguration.cs

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,27 @@
44
[CreateAssetMenu(fileName = "Assets/Resources/DemoConfig.asset", menuName = "DemoConfig", order = 999)]
55
public class DemoConfiguration : ScriptableObject
66
{
7-
public bool Enabled = false;
8-
public string ApiUrl = string.Empty;
9-
public User User;
7+
[Header("Master Switch")]
8+
[SerializeField] private bool _enabled;
9+
10+
[Header("Leaderboard Configuration")]
11+
[SerializeField] private string _apiUrl = string.Empty;
12+
[SerializeField] private User _user;
1013

11-
public bool AutoPlay;
12-
public bool NotHotDogParticleEffect;
13-
public bool FetchUpgradeFromServer;
14-
public bool CrashOnGameOver;
14+
[Header("Demo Settings")]
15+
[SerializeField] private bool _autoPlay;
16+
[SerializeField] private bool _notHotDogParticleEffect;
17+
[SerializeField] private bool _fetchUpgradeFromServer;
18+
[SerializeField] private bool _crashOnGameOver;
19+
20+
public bool Enabled => _enabled;
21+
public string ApiUrl => _apiUrl;
22+
public User User => _user;
23+
24+
public bool AutoPlay => _enabled && _autoPlay;
25+
public bool NotHotDogParticleEffect => _enabled && _notHotDogParticleEffect;
26+
public bool FetchUpgradeFromServer => _enabled && _fetchUpgradeFromServer;
27+
public bool CrashOnGameOver => _enabled && _crashOnGameOver;
1528
}
1629

1730
[Serializable]

Assets/Scripts/SceneManagers/NativeSaver.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@
77
NOINLINE void save_score_to_disk(int score)
88
{
99
volatile char *ptr = (char*)0x1;
10-
*bad_ptr = score;
10+
*ptr = score;
1111
}

0 commit comments

Comments
 (0)