Bunch of stuff, working saves

This commit is contained in:
nexovec 2022-01-30 00:05:42 +01:00
parent 758c83cfd2
commit 2bcc48139d
2 changed files with 22 additions and 5 deletions

View File

@ -14,10 +14,10 @@ OcclusionCullingSettings:
RenderSettings: RenderSettings:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
serializedVersion: 9 serializedVersion: 9
m_Fog: 0 m_Fog: 1
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} m_FogColor: {r: 0.084905684, g: 0.084905684, b: 0.084905684, a: 1}
m_FogMode: 3 m_FogMode: 3
m_FogDensity: 0.01 m_FogDensity: 0.022
m_LinearFogStart: 0 m_LinearFogStart: 0
m_LinearFogEnd: 300 m_LinearFogEnd: 300
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
@ -303,6 +303,20 @@ PrefabInstance:
m_Modification: m_Modification:
m_TransformParent: {fileID: 0} m_TransformParent: {fileID: 0}
m_Modifications: m_Modifications:
- target: {fileID: 1258916149, guid: ec622cf6f0988bc42a99ba84304c15a9, type: 3}
propertyPath: m_text
value: 'Sonillion
JonatanRek
nexovec
Maartendo 64'
objectReference: {fileID: 0}
- target: {fileID: 1507557244, guid: ec622cf6f0988bc42a99ba84304c15a9, type: 3}
propertyPath: m_SizeDelta.y
value: 150
objectReference: {fileID: 0}
- target: {fileID: 3244356566819001085, guid: ec622cf6f0988bc42a99ba84304c15a9, type: 3} - target: {fileID: 3244356566819001085, guid: ec622cf6f0988bc42a99ba84304c15a9, type: 3}
propertyPath: m_LocalPosition.y propertyPath: m_LocalPosition.y
value: 1.82 value: 1.82

View File

@ -25,8 +25,11 @@ public class UiController : MonoBehaviour
} }
public static void SaveGame() public static void SaveGame()
{ {
PlayerPrefs.SetInt("HighestScore", (int)UiController.distance); if (UiController.distance > UiController.highScore)
PlayerPrefs.Save(); {
PlayerPrefs.SetInt("HighestScore", (int)UiController.distance);
PlayerPrefs.Save();
}
Debug.Log("Game data saved!"); Debug.Log("Game data saved!");
} }
static void LoadGame() static void LoadGame()