Skip to content

Commit

Permalink
fixes an issue with loading menus and time initial value
Browse files Browse the repository at this point in the history
  • Loading branch information
ptaillandier committed Apr 8, 2024
1 parent 3203643 commit e0c6c97
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,24 @@
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2180264
Material:
serializedVersion: 6
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: LiberationSans SDF Material
m_Shader: {fileID: 4800000, guid: fe393ace9b354375a9cb14cdbbc28be4, type: 3}
m_ShaderKeywords:
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 1
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
Expand Down Expand Up @@ -67,6 +71,7 @@ Material:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _Ambient: 0.5
- _Bevel: 0.5
Expand Down Expand Up @@ -148,6 +153,7 @@ Material:
- _ReflectOutlineColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecularColor: {r: 1, g: 1, b: 1, a: 1}
- _UnderlayColor: {r: 0, g: 0, b: 0, a: 0.5}
m_BuildTextureStacks: []
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
Expand All @@ -165,15 +171,16 @@ MonoBehaviour:
materialHashCode: 462855346
m_Version: 1.1.0
m_SourceFontFileGUID: e3265ab4bf004d28a9537516768c1c75
m_SourceFontFile_EditorRef: {fileID: 12800000, guid: e3265ab4bf004d28a9537516768c1c75,
type: 3}
m_SourceFontFile_EditorRef: {fileID: 12800000, guid: e3265ab4bf004d28a9537516768c1c75, type: 3}
m_SourceFontFile: {fileID: 12800000, guid: e3265ab4bf004d28a9537516768c1c75, type: 3}
m_AtlasPopulationMode: 1
m_FaceInfo:
m_FaceIndex: 0
m_FamilyName: Liberation Sans
m_StyleName: Regular
m_PointSize: 86
m_Scale: 1
m_UnitsPerEM: 0
m_LineHeight: 98.8916
m_AscentLine: 77.853516
m_CapLine: 59
Expand Down Expand Up @@ -313,15 +320,21 @@ Texture2D:
Hash: 00000000000000000000000000000000
m_ForcedFallbackFormat: 4
m_DownscaleFallback: 0
m_IsAlphaChannelOptional: 0
serializedVersion: 2
m_Width: 0
m_Height: 0
m_CompleteImageSize: 0
m_MipsStripped: 0
m_TextureFormat: 1
m_MipCount: 1
m_IsReadable: 1
m_IsPreProcessed: 0
m_IgnoreMipmapLimit: 0
m_MipmapLimitGroupName:
m_StreamingMipmaps: 0
m_StreamingMipmapsPriority: 0
m_VTOnly: 0
m_AlphaIsTransparency: 0
m_ImageCount: 1
m_TextureDimension: 2
Expand All @@ -335,9 +348,11 @@ Texture2D:
m_WrapW: 0
m_LightmapFormat: 0
m_ColorSpace: 0
m_PlatformBlob:
image data: 0
_typelessdata:
m_StreamData:
serializedVersion: 2
offset: 0
size: 0
path:
7 changes: 7 additions & 0 deletions Assets/Plugins/PlayMaker/PlayMaker.sln.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Assets/Scenes/StartupMenu.unity
Original file line number Diff line number Diff line change
Expand Up @@ -1631,7 +1631,7 @@ RectTransform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1649425397}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalPosition: {x: 0, y: 0, z: 3}
m_LocalScale: {x: 0.002, y: 0.002, z: 0.002}
m_ConstrainProportionsScale: 0
m_Children:
Expand All @@ -1641,7 +1641,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: -0.08, y: 1.1}
m_AnchoredPosition: {x: -0.08, y: 1.2}
m_SizeDelta: {x: 830, y: 600}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1649425399
Expand Down
2 changes: 2 additions & 0 deletions Assets/Scripts/MenuController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ public void Start()
//Adds a listener to the main slider and invokes a method when the value changes.
mainSlider.onValueChanged.AddListener(delegate { ValueChangeCheck(); });
gameDurationText.SetText("Game duration: " + mainSlider.value + "s");
PlayerPrefs.SetFloat("duration", mainSlider.value);

}

// Invoked when the value of the slider changes.
Expand Down
11 changes: 0 additions & 11 deletions Assets/Scripts/Utils/ExceptionWatcher.cs.meta

This file was deleted.

4 changes: 3 additions & 1 deletion Assets/Scripts/Utils/ManageSceneLoading.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,13 @@ public void LoadScene(string scene)

IEnumerator loadASync(string scene)
{
AsyncOperation operation = SceneManager.LoadSceneAsync(scene);

toDisable.SetActive(false);
loadingScreen.SetActive(true);

AsyncOperation operation = SceneManager.LoadSceneAsync(scene);


while (!operation.isDone)
{
float progress = Mathf.Clamp01(operation.progress / 0.9f);
Expand Down
2 changes: 1 addition & 1 deletion Assets/Scripts/Utils/Timer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class Timer : MonoBehaviour
// ############################################################

void Start() {
timerDuration = PlayerPrefs.GetFloat("duration");
timerDuration = PlayerPrefs.GetFloat("duration");
timeRemaining = timerDuration;
midTime = timeRemaining / 2;
DisplayTime(timeRemaining-1);
Expand Down

0 comments on commit e0c6c97

Please sign in to comment.