chore: clean up

This commit is contained in:
Théo LUDWIG 2025-05-17 15:16:30 +02:00
parent 0e70858ce9
commit b48e17882c
Signed by: theoludwig
GPG Key ID: ADFE5A563D718F3B
17 changed files with 147 additions and 30 deletions

View File

@ -11,12 +11,6 @@ permissions:
pull-requests: write pull-requests: write
jobs: jobs:
lint-commit:
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v4.2.2"
- uses: "wagoid/commitlint-github-action@v6.2.1"
lint-editorconfig-checker: lint-editorconfig-checker:
runs-on: "ubuntu-latest" runs-on: "ubuntu-latest"
steps: steps:

View File

@ -108,6 +108,19 @@ TextureImporter:
ignorePlatformSupport: 0 ignorePlatformSupport: 0
androidETC2FallbackOverride: 0 androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 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: spriteSheet:
serializedVersion: 2 serializedVersion: 2
sprites: sprites:
@ -234,7 +247,12 @@ TextureImporter:
secondaryTextures: [] secondaryTextures: []
spriteCustomMetadata: spriteCustomMetadata:
entries: [] entries: []
nameFileIdTable: {} nameFileIdTable:
cancelBtn_0: -4579822432219233078
cancelBtn_1: -4181939333999132496
cancelBtn_2: 8512661480653712572
cancelBtn_3: -2543711027167231359
cancelBtn_4: 4838270059752062411
mipmapLimitGroupName: mipmapLimitGroupName:
pSDRemoveMatte: 0 pSDRemoveMatte: 0
userData: userData:

View File

@ -96,6 +96,19 @@ TextureImporter:
ignorePlatformSupport: 0 ignorePlatformSupport: 0
androidETC2FallbackOverride: 0 androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 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: spriteSheet:
serializedVersion: 2 serializedVersion: 2
sprites: sprites:
@ -134,7 +147,8 @@ TextureImporter:
secondaryTextures: [] secondaryTextures: []
spriteCustomMetadata: spriteCustomMetadata:
entries: [] entries: []
nameFileIdTable: {} nameFileIdTable:
closeBtn_0: -654415992179358624
mipmapLimitGroupName: mipmapLimitGroupName:
pSDRemoveMatte: 0 pSDRemoveMatte: 0
userData: userData:

View File

@ -96,6 +96,19 @@ TextureImporter:
ignorePlatformSupport: 0 ignorePlatformSupport: 0
androidETC2FallbackOverride: 0 androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 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: spriteSheet:
serializedVersion: 2 serializedVersion: 2
sprites: sprites:
@ -134,7 +147,8 @@ TextureImporter:
secondaryTextures: [] secondaryTextures: []
spriteCustomMetadata: spriteCustomMetadata:
entries: [] entries: []
nameFileIdTable: {} nameFileIdTable:
editorBtn_0: 9002939317064965793
mipmapLimitGroupName: mipmapLimitGroupName:
pSDRemoveMatte: 0 pSDRemoveMatte: 0
userData: userData:

View File

@ -96,6 +96,19 @@ TextureImporter:
ignorePlatformSupport: 0 ignorePlatformSupport: 0
androidETC2FallbackOverride: 0 androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 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: spriteSheet:
serializedVersion: 2 serializedVersion: 2
sprites: sprites:
@ -134,7 +147,8 @@ TextureImporter:
secondaryTextures: [] secondaryTextures: []
spriteCustomMetadata: spriteCustomMetadata:
entries: [] entries: []
nameFileIdTable: {} nameFileIdTable:
importBtn_0: 6669414160430206226
mipmapLimitGroupName: mipmapLimitGroupName:
pSDRemoveMatte: 0 pSDRemoveMatte: 0
userData: userData:

View File

@ -96,6 +96,19 @@ TextureImporter:
ignorePlatformSupport: 0 ignorePlatformSupport: 0
androidETC2FallbackOverride: 0 androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 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: spriteSheet:
serializedVersion: 2 serializedVersion: 2
sprites: sprites:
@ -134,7 +147,8 @@ TextureImporter:
secondaryTextures: [] secondaryTextures: []
spriteCustomMetadata: spriteCustomMetadata:
entries: [] entries: []
nameFileIdTable: {} nameFileIdTable:
importBtn2_0: -1409255045544979666
mipmapLimitGroupName: mipmapLimitGroupName:
pSDRemoveMatte: 0 pSDRemoveMatte: 0
userData: userData:

View File

@ -96,6 +96,19 @@ TextureImporter:
ignorePlatformSupport: 0 ignorePlatformSupport: 0
androidETC2FallbackOverride: 0 androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 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: spriteSheet:
serializedVersion: 2 serializedVersion: 2
sprites: sprites:
@ -134,7 +147,8 @@ TextureImporter:
secondaryTextures: [] secondaryTextures: []
spriteCustomMetadata: spriteCustomMetadata:
entries: [] entries: []
nameFileIdTable: {} nameFileIdTable:
playBtn_0: -4287216300838241123
mipmapLimitGroupName: mipmapLimitGroupName:
pSDRemoveMatte: 0 pSDRemoveMatte: 0
userData: userData:

View File

@ -111,6 +111,19 @@ TextureImporter:
ignorePlatformSupport: 0 ignorePlatformSupport: 0
androidETC2FallbackOverride: 0 androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 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: spriteSheet:
serializedVersion: 2 serializedVersion: 2
sprites: sprites:
@ -259,7 +272,13 @@ TextureImporter:
secondaryTextures: [] secondaryTextures: []
spriteCustomMetadata: spriteCustomMetadata:
entries: [] entries: []
nameFileIdTable: {} nameFileIdTable:
saveBtn_0: -626436719271748831
saveBtn_1: -1715996769668828261
saveBtn_2: -8850024829547459184
saveBtn_3: 9204917831739309651
saveBtn_4: -7034966553427437937
saveBtn_5: -142403778502646489
mipmapLimitGroupName: mipmapLimitGroupName:
pSDRemoveMatte: 0 pSDRemoveMatte: 0
userData: userData:

View File

@ -300,7 +300,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 4.799972, y: -181.581} m_AnchoredPosition: {x: 3.6, y: -182.2}
m_SizeDelta: {x: 629.6868, y: 98.2373} m_SizeDelta: {x: 629.6868, y: 98.2373}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &92159576 --- !u!114 &92159576
@ -623,7 +623,7 @@ MonoBehaviour:
starTemplate: {fileID: 1331855743} starTemplate: {fileID: 1331855743}
starsContainer: {fileID: 760835823} starsContainer: {fileID: 760835823}
levelsLoader: {fileID: 0} levelsLoader: {fileID: 0}
starSpacing: 1 extraPadding: 10
--- !u!1 &633505916 --- !u!1 &633505916
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -734,7 +734,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -18, y: -132} m_AnchoredPosition: {x: 3.6, y: -135.3}
m_SizeDelta: {x: 629.6868, y: 98.2373} m_SizeDelta: {x: 629.6868, y: 98.2373}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &760653960 --- !u!114 &760653960
@ -826,7 +826,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: -63} m_AnchoredPosition: {x: 0, y: -41}
m_SizeDelta: {x: 375, y: 100} m_SizeDelta: {x: 375, y: 100}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &954359120 --- !u!1 &954359120
@ -1584,7 +1584,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -47.518017, y: -230.241} m_AnchoredPosition: {x: 3.6, y: -95.2}
m_SizeDelta: {x: 629.6868, y: 98.2373} m_SizeDelta: {x: 629.6868, y: 98.2373}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1571276506 --- !u!114 &1571276506

View File

@ -50,7 +50,10 @@ public class LevelsLoader : MonoBehaviour
private void SaveLevelCurrent() private void SaveLevelCurrent()
{ {
if (levelCurrent == null) return; if (levelCurrent == null)
{
return;
}
LevelStat levelStat = new() LevelStat levelStat = new()
{ {
@ -68,7 +71,10 @@ public class LevelsLoader : MonoBehaviour
public void NextLevel() public void NextLevel()
{ {
if (levels.Count == 0) return; if (levels.Count == 0)
{
return;
}
int currentIndex = levels.IndexOf(levelCurrent); int currentIndex = levels.IndexOf(levelCurrent);
levelCurrent = levels[(currentIndex + 1) % levels.Count]; levelCurrent = levels[(currentIndex + 1) % levels.Count];
@ -76,7 +82,10 @@ public class LevelsLoader : MonoBehaviour
public void PreviousLevel() public void PreviousLevel()
{ {
if (levels.Count == 0) return; if (levels.Count == 0)
{
return;
}
int currentIndex = levels.IndexOf(levelCurrent); int currentIndex = levels.IndexOf(levelCurrent);
levelCurrent = levels[(currentIndex - 1 + levels.Count) % levels.Count]; levelCurrent = levels[(currentIndex - 1 + levels.Count) % levels.Count];
@ -84,7 +93,10 @@ public class LevelsLoader : MonoBehaviour
public void IncreaseTotalJumps() public void IncreaseTotalJumps()
{ {
if (levelCurrent == null) return; if (levelCurrent == null)
{
return;
}
levelCurrent.TotalJumps += 1; levelCurrent.TotalJumps += 1;
SaveLevelCurrent(); SaveLevelCurrent();
@ -92,7 +104,10 @@ public class LevelsLoader : MonoBehaviour
public void IncreaseTotalAttempts() public void IncreaseTotalAttempts()
{ {
if (levelCurrent == null) return; if (levelCurrent == null)
{
return;
}
levelCurrent.TotalAttempts += 1; levelCurrent.TotalAttempts += 1;
SaveLevelCurrent(); SaveLevelCurrent();
@ -100,7 +115,10 @@ public class LevelsLoader : MonoBehaviour
public int CalculateCurrentProgressionPercent(Vector3 playerPosition) public int CalculateCurrentProgressionPercent(Vector3 playerPosition)
{ {
if (levelCurrent == null) return 0; if (levelCurrent == null)
{
return 0;
}
float lastX = levelCurrent.LastX; float lastX = levelCurrent.LastX;
GameObject winnerWallPrefab = Resources.Load<GameObject>("Prefabs/WinnerWall"); GameObject winnerWallPrefab = Resources.Load<GameObject>("Prefabs/WinnerWall");
@ -125,6 +143,8 @@ public class LevelsLoader : MonoBehaviour
levels.Clear(); levels.Clear();
LoadAllLevels(); LoadAllLevels();
if (levels.Count > 0) if (levels.Count > 0)
{
levelCurrent = levels[0]; levelCurrent = levels[0];
} }
} }
}

View File

@ -10,6 +10,7 @@ public class LevelHomeButton : MonoBehaviour
public static IEnumerator PlaySoundAndLoadScene(AudioSource sfxSource, string scene) public static IEnumerator PlaySoundAndLoadScene(AudioSource sfxSource, string scene)
{ {
yield return new WaitWhile(() => sfxSource.isPlaying); yield return new WaitWhile(() => sfxSource.isPlaying);
Time.timeScale = 1;
SceneManager.LoadScene(scene); SceneManager.LoadScene(scene);
} }

View File

@ -105,11 +105,10 @@ public class Player : MonoBehaviour
if (collision.gameObject.CompareTag("Kill")) if (collision.gameObject.CompareTag("Kill"))
{ {
Time.timeScale = 0;
sfxSource.clip = Resources.Load<AudioClip>(Path.Combine("Sounds", "death")); sfxSource.clip = Resources.Load<AudioClip>(Path.Combine("Sounds", "death"));
sfxSource.Play(); sfxSource.Play();
StartCoroutine(LevelHomeButton.PlaySoundAndLoadScene(sfxSource, SceneManager.GetActiveScene().name)); StartCoroutine(LevelHomeButton.PlaySoundAndLoadScene(sfxSource, SceneManager.GetActiveScene().name));
} }
if (collision.gameObject.CompareTag("Win")) if (collision.gameObject.CompareTag("Win"))

View File

@ -50,7 +50,6 @@ public class SelectDifficulty : MonoBehaviour
public void PreviousDifficulty() public void PreviousDifficulty()
{ {
Debug.Log("PreviousDifficulty called");
if (currentDifficulty > MinDiff) if (currentDifficulty > MinDiff)
{ {
currentDifficulty--; currentDifficulty--;
@ -60,7 +59,6 @@ public class SelectDifficulty : MonoBehaviour
public void NextDifficulty() public void NextDifficulty()
{ {
Debug.Log("NextDifficulty called");
if (currentDifficulty < MaxDiff) if (currentDifficulty < MaxDiff)
{ {
currentDifficulty++; currentDifficulty++;

View File

@ -50,7 +50,6 @@ public class StarsRenderer : MonoBehaviour
{ {
useManualMode = true; useManualMode = true;
manualDifficulty = Mathf.Clamp(difficulty, 1, 5); manualDifficulty = Mathf.Clamp(difficulty, 1, 5);
Debug.Log($"[StarsRenderer] SetManualDifficulty → manualDifficulty = {manualDifficulty}");
lastRenderedDifficulty = -1; lastRenderedDifficulty = -1;
RenderStarsInternal(manualDifficulty); RenderStarsInternal(manualDifficulty);
} }
@ -74,7 +73,6 @@ public class StarsRenderer : MonoBehaviour
private void RenderStarsInternal(int difficulty) private void RenderStarsInternal(int difficulty)
{ {
Debug.Log($"[StarsRenderer] RenderStarsInternal → difficulté = {difficulty}", this);
for (int i = starsContainer.childCount - 1; i >= 0; i--) for (int i = starsContainer.childCount - 1; i >= 0; i--)
{ {
var child = starsContainer.GetChild(i); var child = starsContainer.GetChild(i);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 387 KiB

After

Width:  |  Height:  |  Size: 415 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 619 KiB

After

Width:  |  Height:  |  Size: 702 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 589 KiB

After

Width:  |  Height:  |  Size: 616 KiB