fix: add more sound effects + buttons scaling in editor mode

This commit is contained in:
Théo LUDWIG 2025-05-17 19:30:14 +02:00
parent 9a88fc81ec
commit dc442e2acb
Signed by: theoludwig
GPG Key ID: ADFE5A563D718F3B
10 changed files with 934 additions and 67 deletions

View File

@ -96,6 +96,19 @@ TextureImporter:
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites:
@ -134,7 +147,8 @@ TextureImporter:
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable: {}
nameFileIdTable:
createALevelBtn_0: -1609267759769251333
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:

View File

@ -96,6 +96,19 @@ TextureImporter:
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites:
@ -134,7 +147,8 @@ TextureImporter:
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable: {}
nameFileIdTable:
editALevelBtn_0: -2153231444099213249
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:

View File

@ -1,22 +1,757 @@
{
"name": "Back on Track",
"musicName": "BackOnTrack",
"order": 2,
"difficulty": 1,
"elements": [
{
"type": "Spike",
"x": -6.684000015258789,
"y": -2.8970000743865969,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "Spike",
"x": -3.059999942779541,
"y": -2.930000066757202,
"scaleX": -1.0,
"scaleY": -1.0
}
]
"name": "Back on Track",
"musicName": "BackOnTrack",
"order": 2,
"difficulty": 1,
"elements": [
{
"type": "Spike",
"x": -9.5,
"y": -3.200000047683716,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "SmallSpike",
"x": 2.5999999046325685,
"y": -3.4100000858306886,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "Spike",
"x": 3.4000000953674318,
"y": -3.200000047683716,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "Spike",
"x": 11.0,
"y": -3.200000047683716,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "Spike",
"x": 11.850000381469727,
"y": -3.200000047683716,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "ObstacleBlock",
"x": 12.850000381469727,
"y": -3.0,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "KillZone",
"x": 14.449999809265137,
"y": -3.200000047683716,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "ObstacleBlock",
"x": 16.0,
"y": -3.0,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "ObstacleBlock",
"x": 16.0,
"y": -2.0,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "KillZone",
"x": 17.649999618530275,
"y": -3.200000047683716,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "ObstacleBlock",
"x": 19.049999237060548,
"y": -3.0,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "ObstacleBlock",
"x": 19.049999237060548,
"y": -2.0,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "ObstacleBlock",
"x": 19.049999237060548,
"y": -1.0,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "Spike",
"x": 28.5,
"y": -3.200000047683716,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "Spike",
"x": 29.299999237060548,
"y": -3.200000047683716,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "ObstacleBlock",
"x": 35.599998474121097,
"y": -3.0999999046325685,
"scaleX": 1.2000000476837159,
"scaleY": 0.15000000596046449
},
{
"type": "KillZone",
"x": 39.810001373291019,
"y": -3.200000047683716,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "ObstacleBlock",
"x": 44.04999923706055,
"y": -3.0999999046325685,
"scaleX": 1.2000000476837159,
"scaleY": 0.15000000596046449
},
{
"type": "Spike",
"x": 44.099998474121097,
"y": -2.4200000762939455,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "KillZone",
"x": 48.25,
"y": -3.200000047683716,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "ObstacleBlock",
"x": 52.45000076293945,
"y": -2.9000000953674318,
"scaleX": 1.2000000476837159,
"scaleY": 0.23000000417232514
},
{
"type": "Spike",
"x": 52.5,
"y": -2.0,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "SmallObstacleBlock",
"x": 58.0,
"y": -1.2000000476837159,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "SmallObstacleBlock",
"x": 61.5,
"y": 0.4000000059604645,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "SmallObstacleBlock",
"x": 65.0,
"y": 2.0,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "SmallObstacleBlock",
"x": 68.5,
"y": 3.5999999046325685,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "SmallObstacleBlock",
"x": 72.0,
"y": 5.199999809265137,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "KillZone",
"x": 56.38999938964844,
"y": -3.200000047683716,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "KillZone",
"x": 58.22999954223633,
"y": -3.200000047683716,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "KillZone",
"x": 60.0,
"y": -3.200000047683716,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "KillZone",
"x": 61.0,
"y": -3.200000047683716,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "KillZone",
"x": 62.79999923706055,
"y": -3.200000047683716,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "KillZone",
"x": 64.5999984741211,
"y": -3.200000047683716,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "KillZone",
"x": 66.5999984741211,
"y": -3.200000047683716,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "KillZone",
"x": 68.19999694824219,
"y": -3.200000047683716,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "KillZone",
"x": 69.9000015258789,
"y": -3.200000047683716,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "KillZone",
"x": 71.69999694824219,
"y": -3.200000047683716,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "KillZone",
"x": 73.5,
"y": -3.200000047683716,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "ObstacleBlock",
"x": 81.94000244140625,
"y": 0.5199999809265137,
"scaleX": 3.0,
"scaleY": 1.559999942779541
},
{
"type": "ObstacleBlock",
"x": 97.30999755859375,
"y": 0.03999999910593033,
"scaleX": 3.0,
"scaleY": 1.3799999952316285
},
{
"type": "ObstacleBlock",
"x": 112.66999816894531,
"y": 0.5199999809265137,
"scaleX": 3.0,
"scaleY": 1.559999942779541
},
{
"type": "ObstacleBlock",
"x": 128.0500030517578,
"y": -0.6499999761581421,
"scaleX": 3.0,
"scaleY": 1.1100000143051148
},
{
"type": "Spike",
"x": 77.6500015258789,
"y": 4.829999923706055,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "Spike",
"x": 78.44999694824219,
"y": 4.829999923706055,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "Spike",
"x": 79.30999755859375,
"y": 4.829999923706055,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "Spike",
"x": 80.16000366210938,
"y": 4.829999923706055,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "Spike",
"x": 84.4800033569336,
"y": 4.829999923706055,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "Spike",
"x": 85.2699966430664,
"y": 4.829999923706055,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "Spike",
"x": 86.16000366210938,
"y": 4.829999923706055,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "Spike",
"x": 86.94999694824219,
"y": 4.829999923706055,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "Spike",
"x": 95.87000274658203,
"y": 5.75,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "Spike",
"x": 96.68000030517578,
"y": 5.75,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "Spike",
"x": 97.5199966430664,
"y": 5.75,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "Spike",
"x": 98.36000061035156,
"y": 5.75,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "SmallObstacleBlock",
"x": 78.54000091552735,
"y": 5.900000095367432,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "SmallObstacleBlock",
"x": 79.56999969482422,
"y": 5.900000095367432,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "SmallObstacleBlock",
"x": 85.33999633789063,
"y": 5.900000095367432,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "SmallObstacleBlock",
"x": 86.36000061035156,
"y": 5.900000095367432,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "SmallObstacleBlock",
"x": 95.8499984741211,
"y": 5.179999828338623,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "SmallObstacleBlock",
"x": 96.68000030517578,
"y": 5.179999828338623,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "SmallObstacleBlock",
"x": 97.5199966430664,
"y": 5.179999828338623,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "SmallObstacleBlock",
"x": 98.36000061035156,
"y": 5.179999828338623,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "Spike",
"x": 119.94999694824219,
"y": 4.860000133514404,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "Spike",
"x": 120.87000274658203,
"y": 2.509999990463257,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "KillZone",
"x": 136.5,
"y": -3.200000047683716,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "KillZone",
"x": 138.1999969482422,
"y": -3.200000047683716,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "KillZone",
"x": 139.89999389648438,
"y": -3.200000047683716,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "KillZone",
"x": 141.60000610351563,
"y": -3.200000047683716,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "KillZone",
"x": 143.3000030517578,
"y": -3.200000047683716,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "KillZone",
"x": 145.0,
"y": -3.200000047683716,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "KillZone",
"x": 146.6999969482422,
"y": -3.200000047683716,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "KillZone",
"x": 148.39999389648438,
"y": -3.200000047683716,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "KillZone",
"x": 150.10000610351563,
"y": -3.200000047683716,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "KillZone",
"x": 151.8000030517578,
"y": -3.200000047683716,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "KillZone",
"x": 153.5,
"y": -3.200000047683716,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "KillZone",
"x": 155.1999969482422,
"y": -3.200000047683716,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "KillZone",
"x": 156.89999389648438,
"y": -3.200000047683716,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "KillZone",
"x": 158.60000610351563,
"y": -3.200000047683716,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "KillZone",
"x": 160.3000030517578,
"y": -3.200000047683716,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "KillZone",
"x": 162.0,
"y": -3.200000047683716,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "KillZone",
"x": 163.6999969482422,
"y": -3.200000047683716,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "KillZone",
"x": 165.39999389648438,
"y": -3.200000047683716,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "KillZone",
"x": 167.10000610351563,
"y": -3.200000047683716,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "KillZone",
"x": 168.8000030517578,
"y": -3.200000047683716,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "KillZone",
"x": 170.5,
"y": -3.200000047683716,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "SmallObstacleBlock",
"x": 138.5,
"y": 2.0399999618530275,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "SmallObstacleBlock",
"x": 139.33999633789063,
"y": 2.0399999618530275,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "SmallObstacleBlock",
"x": 140.17999267578126,
"y": 2.0399999618530275,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "SmallObstacleBlock",
"x": 141.02000427246095,
"y": 2.0399999618530275,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "SmallObstacleBlock",
"x": 143.3000030517578,
"y": 0.8899999856948853,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "SmallObstacleBlock",
"x": 144.13999938964845,
"y": 0.8899999856948853,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "SmallObstacleBlock",
"x": 144.97999572753907,
"y": 0.8899999856948853,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "SmallObstacleBlock",
"x": 145.82000732421876,
"y": 0.8899999856948853,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "SmallObstacleBlock",
"x": 146.66000366210938,
"y": 0.8899999856948853,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "SmallObstacleBlock",
"x": 147.5,
"y": 0.8899999856948853,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "SmallObstacleBlock",
"x": 148.33999633789063,
"y": 0.8899999856948853,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "SmallObstacleBlock",
"x": 150.4199981689453,
"y": -0.3100000023841858,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "SmallObstacleBlock",
"x": 151.25,
"y": -0.3100000023841858,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "SmallObstacleBlock",
"x": 151.0800018310547,
"y": -0.3100000023841858,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "SmallObstacleBlock",
"x": 152.91000366210938,
"y": -0.3100000023841858,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "SmallObstacleBlock",
"x": 153.74000549316407,
"y": -0.3100000023841858,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "SmallObstacleBlock",
"x": 156.6999969482422,
"y": 1.2999999523162842,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "SmallObstacleBlock",
"x": 160.1999969482422,
"y": 2.9000000953674318,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "SmallObstacleBlock",
"x": 163.8000030517578,
"y": 4.5,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "SmallObstacleBlock",
"x": 167.3000030517578,
"y": 6.099999904632568,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "SmallObstacleBlock",
"x": 170.8000030517578,
"y": 7.699999809265137,
"scaleX": -1.0,
"scaleY": -1.0
},
{
"type": "SmallObstacleBlock",
"x": 174.3000030517578,
"y": 9.300000190734864,
"scaleX": -1.0,
"scaleY": -1.0
}
]
}

View File

@ -5559,8 +5559,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: -359.836}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -408.8241, y: 196.49884}
m_SizeDelta: {x: 68.0074, y: 66.5696}
m_AnchoredPosition: {x: -498, y: 257.98}
m_SizeDelta: {x: 78.3177, y: 71.7616}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &590020933
MonoBehaviour:
@ -5854,8 +5854,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 399.99994, y: 150}
m_SizeDelta: {x: 50, y: 50}
m_AnchoredPosition: {x: 480.93127, y: 252.93127}
m_SizeDelta: {x: 81.8625, y: 81.8625}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &678214374
MonoBehaviour:
@ -6157,7 +6157,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 300, y: -200}
m_AnchoredPosition: {x: 357, y: -266}
m_SizeDelta: {x: 50, y: 50}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &740715252
@ -7127,7 +7127,7 @@ MonoBehaviour:
levelsLoader: {fileID: 0}
editMode: 1
createMode: 0
musicSource: {fileID: 0}
musicSource: {fileID: 1479180208}
progressionText: {fileID: 0}
--- !u!4 &1479180210
Transform:
@ -7342,7 +7342,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -400, y: -100}
m_AnchoredPosition: {x: -437, y: -263}
m_SizeDelta: {x: 75, y: 75}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1561821049
@ -7650,7 +7650,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 180}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 375, y: -200}
m_AnchoredPosition: {x: 419, y: -266}
m_SizeDelta: {x: 50, y: 50}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1628925094
@ -8201,7 +8201,7 @@ Transform:
m_GameObject: {fileID: 2030873960}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -2.9290543, y: 0.2814547, z: 0.0022875525}
m_LocalPosition: {x: -81, y: -22, z: 0.0022875525}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:

View File

@ -6007,6 +6007,7 @@ MonoBehaviour:
pauseMenu: {fileID: 892725781}
pauseButton: {fileID: 1038445495}
levelLoader: {fileID: 1999482186}
sfxSource: {fileID: 1247869546}
volumeSlider: {fileID: 6776934}
--- !u!1 &988798827
GameObject:

View File

@ -96,11 +96,11 @@ public class LevelEditor : MonoBehaviour
var bg = canvas?.Find("BlankSquare");
var icon = canvas?.Find("PrefabIcon");
if (bg == null || icon == null) { Destroy(t.gameObject); return; }
float xOff = -375f + idx * 125f;
float xOff = -325f + idx * 125f;
var bgRt = bg.GetComponent<RectTransform>();
var icRt = icon.GetComponent<RectTransform>();
bgRt.anchoredPosition = new Vector2(xOff, bgRt.anchoredPosition.y);
icRt.anchoredPosition = new Vector2(xOff, icRt.anchoredPosition.y);
bgRt.anchoredPosition = new Vector2(xOff, bgRt.anchoredPosition.y - 70);
icRt.anchoredPosition = new Vector2(xOff, icRt.anchoredPosition.y - 70);
bg.GetComponent<Image>().sprite = Resources.Load<Sprite>("InGame/ButtonSkin/BlankSquare");
icon.GetComponent<Image>().sprite = prefab.GetComponent<SpriteRenderer>()?.sprite;
icRt.sizeDelta = prefab.name.ToLower().Contains("small")

View File

@ -24,7 +24,10 @@ public class LevelLoader : MonoBehaviour
private void LoadAudio()
{
musicSource.clip = Resources.Load<AudioClip>(Path.Combine("Musics", levelsLoader.levelCurrent.musicName));
if (editMode)
{
return;
}
if (PlayerPrefs.HasKey("Volume"))
{
musicSource.volume = PlayerPrefs.GetFloat("Volume");
@ -67,19 +70,14 @@ public class LevelLoader : MonoBehaviour
}
}
// En mode jeu/test uniquement → ajout du AICollider
if (!editMode)
{
if (prefab.CompareTag("Kill"))
{
Instantiate(
Resources.Load<GameObject>("AICollider"),
new Vector3(element.x - 1, element.y, 0),
Quaternion.identity
);
}
Instantiate(
Resources.Load<GameObject>("AICollider"),
new Vector3(element.x - 1, element.y, 0),
Quaternion.identity
);
}
// Appliquer l'échelle personnalisée
@ -102,12 +100,8 @@ public class LevelLoader : MonoBehaviour
);
groundInstance.transform.localScale = new Vector3(current.LastX / 5f * 2, 1, 1);
}
}
// Mur de fin toujours placé
GameObject winWall = GetPrefab("WinnerWall");
if (winWall != null)
{
GameObject winWall = GetPrefab("WinnerWall");
Instantiate(
winWall,
new Vector3(current.LastX, 0, 0),
@ -127,8 +121,8 @@ public class LevelLoader : MonoBehaviour
GameObject groundInstance = Instantiate(groundPrefab, new Vector3(current.LastX / 2, groundY, 0), Quaternion.identity);
float groundWidth = current.LastX;
groundInstance.transform.localScale = new Vector3(groundWidth / 5f * 2, 1, 1);
Instantiate(GetPrefab("WinnerWall"), new Vector3(current.LastX, 0, 0), Quaternion.Euler(0, 0, 90));
}
Instantiate(GetPrefab("WinnerWall"), new Vector3(current.LastX, 0, 0), Quaternion.Euler(0, 0, 90));
}
public void Start()

View File

@ -1,3 +1,4 @@
using System.IO;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
@ -7,6 +8,7 @@ public class PauseMenu : MonoBehaviour
public GameObject pauseMenu;
public GameObject pauseButton;
public LevelLoader levelLoader;
public AudioSource sfxSource;
public Slider volumeSlider;
public void Start()
@ -31,6 +33,9 @@ public class PauseMenu : MonoBehaviour
public void Pause()
{
sfxSource.clip = Resources.Load<AudioClip>(Path.Combine("Sounds", "click"));
sfxSource.Play();
Time.timeScale = 0;
levelLoader.musicSource.Pause();
@ -41,11 +46,17 @@ public class PauseMenu : MonoBehaviour
public void Home()
{
Time.timeScale = 1;
SceneManager.LoadScene("HomeScene");
sfxSource.clip = Resources.Load<AudioClip>(Path.Combine("Sounds", "click"));
sfxSource.Play();
StartCoroutine(LevelHomeButton.PlaySoundAndLoadScene(sfxSource, "HomeScene"));
}
public void Resume()
{
sfxSource.clip = Resources.Load<AudioClip>(Path.Combine("Sounds", "click"));
sfxSource.Play();
Time.timeScale = 1;
levelLoader.musicSource.Play();

View File

@ -42,8 +42,8 @@ PlayerSettings:
m_SplashScreenLogos: []
m_VirtualRealitySplashScreen: {fileID: 0}
m_HolographicTrackingLossScreen: {fileID: 0}
defaultScreenWidth: 1920
defaultScreenHeight: 1080
defaultScreenWidth: 1280
defaultScreenHeight: 720
defaultScreenWidthWeb: 960
defaultScreenHeightWeb: 600
m_StereoRenderingPath: 0

View File

@ -6,7 +6,7 @@ QualitySettings:
serializedVersion: 5
m_CurrentQuality: 5
m_QualitySettings:
- serializedVersion: 2
- serializedVersion: 4
name: Very Low
pixelLightCount: 0
shadows: 0
@ -19,16 +19,23 @@ QualitySettings:
shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
shadowmaskMode: 0
skinWeights: 1
textureQuality: 1
globalTextureMipmapLimit: 1
textureMipmapLimitSettings: []
anisotropicTextures: 0
antiAliasing: 0
softParticles: 0
softVegetation: 0
realtimeReflectionProbes: 0
billboardsFaceCameraPosition: 0
useLegacyDetailDistribution: 1
adaptiveVsync: 0
vSyncCount: 0
realtimeGICPUUsage: 25
adaptiveVsyncExtraA: 0
adaptiveVsyncExtraB: 0
lodBias: 0.3
maximumLODLevel: 0
enableLODCrossFade: 1
streamingMipmapsActive: 0
streamingMipmapsAddAllCameras: 1
streamingMipmapsMemoryBudget: 512
@ -41,8 +48,17 @@ QualitySettings:
asyncUploadPersistentBuffer: 1
resolutionScalingFixedDPIFactor: 1
customRenderPipeline: {fileID: 0}
terrainQualityOverrides: 0
terrainPixelError: 1
terrainDetailDensityScale: 1
terrainBasemapDistance: 1000
terrainDetailDistance: 80
terrainTreeDistance: 5000
terrainBillboardStart: 50
terrainFadeLength: 5
terrainMaxTrees: 50
excludedTargetPlatforms: []
- serializedVersion: 2
- serializedVersion: 4
name: Low
pixelLightCount: 0
shadows: 0
@ -55,16 +71,23 @@ QualitySettings:
shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
shadowmaskMode: 0
skinWeights: 2
textureQuality: 0
globalTextureMipmapLimit: 0
textureMipmapLimitSettings: []
anisotropicTextures: 0
antiAliasing: 0
softParticles: 0
softVegetation: 0
realtimeReflectionProbes: 0
billboardsFaceCameraPosition: 0
useLegacyDetailDistribution: 1
adaptiveVsync: 0
vSyncCount: 0
realtimeGICPUUsage: 25
adaptiveVsyncExtraA: 0
adaptiveVsyncExtraB: 0
lodBias: 0.4
maximumLODLevel: 0
enableLODCrossFade: 1
streamingMipmapsActive: 0
streamingMipmapsAddAllCameras: 1
streamingMipmapsMemoryBudget: 512
@ -77,8 +100,17 @@ QualitySettings:
asyncUploadPersistentBuffer: 1
resolutionScalingFixedDPIFactor: 1
customRenderPipeline: {fileID: 0}
terrainQualityOverrides: 0
terrainPixelError: 1
terrainDetailDensityScale: 1
terrainBasemapDistance: 1000
terrainDetailDistance: 80
terrainTreeDistance: 5000
terrainBillboardStart: 50
terrainFadeLength: 5
terrainMaxTrees: 50
excludedTargetPlatforms: []
- serializedVersion: 2
- serializedVersion: 4
name: Medium
pixelLightCount: 1
shadows: 1
@ -91,16 +123,23 @@ QualitySettings:
shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
shadowmaskMode: 0
skinWeights: 2
textureQuality: 0
globalTextureMipmapLimit: 0
textureMipmapLimitSettings: []
anisotropicTextures: 1
antiAliasing: 0
softParticles: 0
softVegetation: 0
realtimeReflectionProbes: 0
billboardsFaceCameraPosition: 0
useLegacyDetailDistribution: 1
adaptiveVsync: 0
vSyncCount: 1
realtimeGICPUUsage: 25
adaptiveVsyncExtraA: 0
adaptiveVsyncExtraB: 0
lodBias: 0.7
maximumLODLevel: 0
enableLODCrossFade: 1
streamingMipmapsActive: 0
streamingMipmapsAddAllCameras: 1
streamingMipmapsMemoryBudget: 512
@ -113,8 +152,17 @@ QualitySettings:
asyncUploadPersistentBuffer: 1
resolutionScalingFixedDPIFactor: 1
customRenderPipeline: {fileID: 0}
terrainQualityOverrides: 0
terrainPixelError: 1
terrainDetailDensityScale: 1
terrainBasemapDistance: 1000
terrainDetailDistance: 80
terrainTreeDistance: 5000
terrainBillboardStart: 50
terrainFadeLength: 5
terrainMaxTrees: 50
excludedTargetPlatforms: []
- serializedVersion: 2
- serializedVersion: 4
name: High
pixelLightCount: 2
shadows: 2
@ -127,16 +175,23 @@ QualitySettings:
shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
shadowmaskMode: 1
skinWeights: 2
textureQuality: 0
globalTextureMipmapLimit: 0
textureMipmapLimitSettings: []
anisotropicTextures: 1
antiAliasing: 0
softParticles: 0
softVegetation: 1
realtimeReflectionProbes: 1
billboardsFaceCameraPosition: 1
useLegacyDetailDistribution: 1
adaptiveVsync: 0
vSyncCount: 1
realtimeGICPUUsage: 50
adaptiveVsyncExtraA: 0
adaptiveVsyncExtraB: 0
lodBias: 1
maximumLODLevel: 0
enableLODCrossFade: 1
streamingMipmapsActive: 0
streamingMipmapsAddAllCameras: 1
streamingMipmapsMemoryBudget: 512
@ -149,8 +204,17 @@ QualitySettings:
asyncUploadPersistentBuffer: 1
resolutionScalingFixedDPIFactor: 1
customRenderPipeline: {fileID: 0}
terrainQualityOverrides: 0
terrainPixelError: 1
terrainDetailDensityScale: 1
terrainBasemapDistance: 1000
terrainDetailDistance: 80
terrainTreeDistance: 5000
terrainBillboardStart: 50
terrainFadeLength: 5
terrainMaxTrees: 50
excludedTargetPlatforms: []
- serializedVersion: 2
- serializedVersion: 4
name: Very High
pixelLightCount: 3
shadows: 2
@ -163,16 +227,23 @@ QualitySettings:
shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
shadowmaskMode: 1
skinWeights: 4
textureQuality: 0
globalTextureMipmapLimit: 0
textureMipmapLimitSettings: []
anisotropicTextures: 2
antiAliasing: 2
softParticles: 1
softVegetation: 1
realtimeReflectionProbes: 1
billboardsFaceCameraPosition: 1
useLegacyDetailDistribution: 1
adaptiveVsync: 0
vSyncCount: 1
realtimeGICPUUsage: 50
adaptiveVsyncExtraA: 0
adaptiveVsyncExtraB: 0
lodBias: 1.5
maximumLODLevel: 0
enableLODCrossFade: 1
streamingMipmapsActive: 0
streamingMipmapsAddAllCameras: 1
streamingMipmapsMemoryBudget: 512
@ -185,8 +256,17 @@ QualitySettings:
asyncUploadPersistentBuffer: 1
resolutionScalingFixedDPIFactor: 1
customRenderPipeline: {fileID: 0}
terrainQualityOverrides: 0
terrainPixelError: 1
terrainDetailDensityScale: 1
terrainBasemapDistance: 1000
terrainDetailDistance: 80
terrainTreeDistance: 5000
terrainBillboardStart: 50
terrainFadeLength: 5
terrainMaxTrees: 50
excludedTargetPlatforms: []
- serializedVersion: 2
- serializedVersion: 4
name: Ultra
pixelLightCount: 4
shadows: 2
@ -199,16 +279,23 @@ QualitySettings:
shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
shadowmaskMode: 1
skinWeights: 255
textureQuality: 0
globalTextureMipmapLimit: 0
textureMipmapLimitSettings: []
anisotropicTextures: 2
antiAliasing: 0
softParticles: 1
softVegetation: 1
realtimeReflectionProbes: 1
billboardsFaceCameraPosition: 1
useLegacyDetailDistribution: 1
adaptiveVsync: 0
vSyncCount: 1
realtimeGICPUUsage: 100
adaptiveVsyncExtraA: 0
adaptiveVsyncExtraB: 0
lodBias: 2
maximumLODLevel: 0
enableLODCrossFade: 1
streamingMipmapsActive: 0
streamingMipmapsAddAllCameras: 1
streamingMipmapsMemoryBudget: 512
@ -221,15 +308,26 @@ QualitySettings:
asyncUploadPersistentBuffer: 1
resolutionScalingFixedDPIFactor: 1
customRenderPipeline: {fileID: 0}
terrainQualityOverrides: 0
terrainPixelError: 1
terrainDetailDensityScale: 1
terrainBasemapDistance: 1000
terrainDetailDistance: 80
terrainTreeDistance: 5000
terrainBillboardStart: 50
terrainFadeLength: 5
terrainMaxTrees: 50
excludedTargetPlatforms: []
m_TextureMipmapLimitGroupNames: []
m_PerPlatformDefaultQuality:
Android: 2
Lumin: 5
GameCoreScarlett: 5
GameCoreXboxOne: 5
Lumin: 5
Nintendo Switch: 5
PS4: 5
PS5: 5
Server: 0
Stadia: 5
Standalone: 5
WebGL: 3