Conversation
|
Caution Review failedThe pull request is closed. WalkthroughCette demande de tirage introduit plusieurs modifications dans les fichiers liés à un piège à ours dans un projet Unity. Les changements incluent l'ajout de nouveaux fichiers de métadonnées pour les actifs du piège, de nouveaux clips d'animation et un contrôleur d'animation, ainsi que des ajustements dans les propriétés des transitions d'animation. De plus, un script pour gérer les interactions du piège avec le joueur a été ajouté. Des modifications ont également été apportées à des éléments d'interface utilisateur et à d'autres actifs de pièges dans le projet. Changes
Possibly related PRs
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 9
🧹 Outside diff range and nitpick comments (4)
Assets/Scripts/Trap/Bear_Trap/Bear_Trap.cs (1)
1-41: Considérez une meilleure séparation des responsabilitésLe script mélange actuellement la logique d'animation et de dégâts. Il serait préférable de :
- Séparer la logique d'animation dans un composant distinct
- Utiliser une interface IDamageable pour gérer les dégâts
- Implémenter un système d'événements pour découpler les interactions
Cette approche rendrait le code plus maintenable et réutilisable.
Assets/Prefabs/Traps/Bear_Trap/Anims/Bear_Trap_Anim_Controller.controller (2)
114-114: Améliorer la lisibilité et l'organisation du contrôleur d'animationL'état par défaut utilise un nom générique "New State" et le positionnement des états dans le graphe n'est pas optimal.
Suggestions :
- Renommer "New State" en "Idle" ou "BearTrap_Idle"
- Réorganiser les positions des états pour une meilleure lisibilité :
- m_Position: {x: 423.24084, y: 233.89761, z: 0} + m_Position: {x: 300, y: 120, z: 0} - m_Position: {x: 450, y: 70, z: 0} + m_Position: {x: 600, y: 120, z: 0}Also applies to: 39-39, 42-42
87-93: Nettoyer la configuration du paramètre IsTouchLe paramètre
IsTouchest défini comme un booléen mais conserve des valeurs par défaut inutilisées pour float et int.Suggestion : Ne conserver que la valeur par défaut booléenne :
m_Name: IsTouch m_Type: 4 - m_DefaultFloat: 0 - m_DefaultInt: 0 m_DefaultBool: 0Assets/PlayerMovementAnimatorController.controller (1)
127-129: Suggestion d'optimisation pour la transition avant.L'ajout d'un offset de transition (
m_TransitionOffset: 0.012336434) pour la marche avant pourrait être appliqué de manière cohérente aux autres directions pour une meilleure uniformité.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
⛔ Files ignored due to path filters (8)
Assets/Prefabs/Traps/Bear_Trap/Anims/Bear_Trap.pngis excluded by!**/*.pngAssets/Prefabs/Traps/Fire_Trap.pngis excluded by!**/*.pngAssets/Prefabs/Traps/Push_Trap_Right.pngis excluded by!**/*.pngAssets/Prefabs/Traps/Spike Trap.pngis excluded by!**/*.pngAssets/Resources/Traps/Bear_Trap.pngis excluded by!**/*.pngAssets/Resources/Traps/Fire_Trap.pngis excluded by!**/*.pngAssets/Resources/Traps/Push_Trap_Right.pngis excluded by!**/*.pngAssets/Resources/Traps/Spike Trap.pngis excluded by!**/*.png
📒 Files selected for processing (26)
- Assets/PlayerMovementAnimatorController.controller (8 hunks)
- Assets/Prefabs/Traps/Bear_Trap.meta (1 hunks)
- Assets/Prefabs/Traps/Bear_Trap/Anims.meta (1 hunks)
- Assets/Prefabs/Traps/Bear_Trap/Anims/Bear_Trap.anim (1 hunks)
- Assets/Prefabs/Traps/Bear_Trap/Anims/Bear_Trap.anim.meta (1 hunks)
- Assets/Prefabs/Traps/Bear_Trap/Anims/Bear_Trap.png.meta (1 hunks)
- Assets/Prefabs/Traps/Bear_Trap/Anims/Bear_Trap_Anim_Controller.controller (1 hunks)
- Assets/Prefabs/Traps/Bear_Trap/Anims/Bear_Trap_Anim_Controller.controller.meta (1 hunks)
- Assets/Prefabs/Traps/Bear_Trap/bear_trap.prefab (1 hunks)
- Assets/Prefabs/Traps/Bear_Trap/bear_trap.prefab.meta (1 hunks)
- Assets/Prefabs/Traps/Fire_Trap.meta (1 hunks)
- Assets/Prefabs/Traps/Fire_Trap.png.meta (1 hunks)
- Assets/Prefabs/Traps/Push_Trap_Right.png.meta (1 hunks)
- Assets/Prefabs/Traps/Spike Trap.png.meta (1 hunks)
- Assets/Prefabs/Traps/Spike_V2.meta (1 hunks)
- Assets/Prefabs/UI/LifeCanvas.prefab (4 hunks)
- Assets/Resources/Traps.meta (1 hunks)
- Assets/Resources/Traps/Bear_Trap.png.meta (1 hunks)
- Assets/Resources/Traps/Fire_Trap.png.meta (1 hunks)
- Assets/Resources/Traps/Push_Trap_Right.png.meta (1 hunks)
- Assets/Resources/Traps/Spike Trap.png.meta (1 hunks)
- Assets/Scenes/EmptyRoom_2.unity (8 hunks)
- Assets/Scripts/Trap/Bear_Trap.meta (1 hunks)
- Assets/Scripts/Trap/Bear_Trap/Bear_Trap.cs (1 hunks)
- Assets/Scripts/Trap/Bear_Trap/Bear_Trap.cs.meta (1 hunks)
- Assets/Scripts/UI/PlayerHealth.cs (1 hunks)
✅ Files skipped from review due to trivial changes (20)
- Assets/Prefabs/Traps/Bear_Trap.meta
- Assets/Prefabs/Traps/Bear_Trap/Anims.meta
- Assets/Prefabs/Traps/Bear_Trap/Anims/Bear_Trap.anim
- Assets/Prefabs/Traps/Bear_Trap/Anims/Bear_Trap.anim.meta
- Assets/Prefabs/Traps/Bear_Trap/Anims/Bear_Trap.png.meta
- Assets/Prefabs/Traps/Bear_Trap/Anims/Bear_Trap_Anim_Controller.controller.meta
- Assets/Prefabs/Traps/Bear_Trap/bear_trap.prefab
- Assets/Prefabs/Traps/Bear_Trap/bear_trap.prefab.meta
- Assets/Prefabs/Traps/Fire_Trap.meta
- Assets/Prefabs/Traps/Fire_Trap.png.meta
- Assets/Prefabs/Traps/Push_Trap_Right.png.meta
- Assets/Prefabs/Traps/Spike Trap.png.meta
- Assets/Prefabs/Traps/Spike_V2.meta
- Assets/Resources/Traps.meta
- Assets/Resources/Traps/Bear_Trap.png.meta
- Assets/Resources/Traps/Push_Trap_Right.png.meta
- Assets/Resources/Traps/Spike Trap.png.meta
- Assets/Scripts/Trap/Bear_Trap.meta
- Assets/Scripts/Trap/Bear_Trap/Bear_Trap.cs.meta
- Assets/Scripts/UI/PlayerHealth.cs
🧰 Additional context used
🔇 Additional comments (13)
Assets/Prefabs/Traps/Bear_Trap/Anims/Bear_Trap_Anim_Controller.controller (1)
61-61: 🛠️ Refactor suggestionRevoir la configuration de l'état d'animation du piège
Deux points importants à considérer :
- La vitesse d'animation (Speed: 10) semble très élevée et pourrait rendre l'animation peu naturelle
- Il n'y a pas de transition de retour vers l'état initial, ce qui signifie que le piège reste activé en permanence
Suggestions d'amélioration :
- Réduire la vitesse d'animation à une valeur plus réaliste (entre 1 et 3)
- Ajouter une transition de retour si le piège doit pouvoir se réinitialiser
- m_Speed: 10 + m_Speed: 2Also applies to: 63-63
Assets/PlayerMovementAnimatorController.controller (2)
385-385: Amélioration de la réactivité des transitions depuis l'état Idle.La suppression du temps de sortie obligatoire (
m_HasExitTime: 0) permet au personnage de réagir instantanément aux commandes du joueur, ce qui est crucial pour éviter les pièges.Also applies to: 410-410
20-23: Les transitions d'animation ont été optimisées pour une meilleure réactivité.Les modifications des durées de transition et des temps de sortie rendent les animations plus fluides et plus réactives. Ces ajustements sont particulièrement importants pour une interaction rapide avec les pièges.
Also applies to: 127-130, 298-301, 323-326
✅ Verification successful
Note: Since the previous command with
rgdidn't work as expected with YAML files, I'm trying a different approach by directly searching for.controllerfiles which are specific to Unity animation controllers, and then examining their contents for transition parameters.
Les modifications des transitions sont cohérentes avec l'ensemble du système d'animation
L'analyse des contrôleurs d'animation du projet révèle que :
- Les transitions rapides (0.06-0.15s) sont utilisées pour les mouvements réactifs du joueur
- Les pièges (Bear_Trap, Crossbow, Spike) utilisent des durées de transition standard (0.25s)
- La plupart des transitions ont
m_HasExitTime: 0pour une réponse immédiateLes ajustements apportés aux transitions du contrôleur de mouvement du joueur sont bien alignés avec les besoins de réactivité, particulièrement pour les interactions avec les pièges.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Vérifier si d'autres contrôleurs d'animation ont des paramètres similaires # pour maintenir la cohérence dans tout le projet rg -l "m_TransitionDuration|m_ExitTime" --type yamlLength of output: 202
Script:
#!/bin/bash # Search for animation controller files and their transition parameters fd -e controller -x cat {} | grep -A 3 "m_TransitionDuration\|m_ExitTime"Length of output: 1880
Script:
#!/bin/bash # List all animation controller files to understand the scope fd -e controllerLength of output: 529
Assets/Resources/Traps/Fire_Trap.png.meta (4)
35-42: Paramètres de texture optimaux pour un jeu 2DLa configuration actuelle est appropriée pour un jeu 2D pixel art :
- filterMode: 0 (Point) pour préserver la netteté des pixels
- aniso: 1 pour minimiser le filtrage
- wrapMode: 1 (Repeat) sur tous les axes
109-405: Configuration correcte du sprite sheetLa découpe du sprite sheet est bien configurée :
- 14 frames de taille uniforme (32x41 pixels)
- Alignement et points de pivot cohérents
- IDs uniques pour chaque frame
- Nommage clair et séquentiel
7-17: Configuration des mipmaps à optimiserLes mipmaps sont désactivées (enableMipMap: 0), ce qui est approprié pour les sprites 2D. Cependant, il serait utile de vérifier si la distance de fade des mipmaps est nécessaire puisque les mipmaps sont désactivées.
51-51: Vérifier la cohérence de spritePixelsToUnitsLa valeur de 32 pour spritePixelsToUnits doit être cohérente avec les autres sprites du jeu pour maintenir des proportions uniformes.
✅ Verification successful
Cette nouvelle approche nous permettra de :
- Vérifier si nous avons bien accès aux fichiers .meta
- Rechercher la valeur de spritePixelsToUnits dans tous les fichiers .meta trouvés
Cette commande nous permettra de voir spécifiquement les valeurs utilisées pour les éléments de gameplay importants qui doivent interagir entre eux.
Attention à la valeur spritePixelsToUnits pour le Fire_Trap
L'analyse montre une incohérence dans les valeurs de spritePixelsToUnits :
- La plupart des pièges utilisent une valeur de 32
- Les flèches utilisent principalement 16 ou 100
- Le Fire_Trap utilise 32, ce qui est cohérent avec les autres pièges
La valeur de 32 pour le Fire_Trap est appropriée car elle correspond à la valeur standard utilisée pour les autres pièges du jeu, assurant ainsi une cohérence dans les proportions et les collisions.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Vérifier la cohérence de spritePixelsToUnits dans les assets echo "=== Valeurs de spritePixelsToUnits dans les assets ===" rg "spritePixelsToUnits: " "Assets/**/*.meta"Length of output: 223
Script:
#!/bin/bash # Rechercher tous les fichiers .meta dans le dépôt echo "=== Recherche des fichiers .meta ===" fd ".meta$" # Puis rechercher spécifiquement spritePixelsToUnits echo -e "\n=== Recherche de spritePixelsToUnits dans les fichiers .meta ===" fd ".meta$" --exec rg "spritePixelsToUnits: " {} || trueLength of output: 414558
Script:
#!/bin/bash # Rechercher les fichiers de pièges et leurs valeurs spritePixelsToUnits echo "=== Valeurs spritePixelsToUnits pour les pièges ===" fd ".*Trap.*\.png\.meta$" --exec rg "spritePixelsToUnits: " {} echo -e "\n=== Valeurs spritePixelsToUnits pour les sprites du joueur ===" fd "Player.*\.png\.meta$" --exec rg "spritePixelsToUnits: " {} echo -e "\n=== Valeurs spritePixelsToUnits pour les autres éléments de gameplay ===" fd "Arrow.*\.png\.meta$" --exec rg "spritePixelsToUnits: " {}Length of output: 1090
Assets/Prefabs/UI/LifeCanvas.prefab (2)
538-538: Vérifier l'alignement de la barre de vieLa barre de vie a été redimensionnée et repositionnée. Assurez-vous que ces modifications s'alignent correctement avec les autres éléments de l'interface utilisateur dans toutes les résolutions d'écran.
Also applies to: 546-546
111-112: Modifications du Canvas nécessitent une vérificationLes nouveaux éléments UI et le changement des canaux de shader pourraient affecter les performances de rendu. Le flag
m_AdditionalShaderChannelsFlagest passé de 0 à 25, ce qui active des canaux supplémentaires.Also applies to: 138-138
✅ Verification successful
The previous command failed because we needed to first find the relevant files. Let's try with
fdto locate prefab and yaml files, then search within them.
Configuration du Canvas cohérente avec les autres préfabs UI
La valeur
m_AdditionalShaderChannelsFlag: 25est déjà utilisée de manière cohérente dans plusieurs autres préfabs UI du projet :
- Pause.prefab
- Timer.prefab
- Dialogue_horizontal.prefab
- Forgeron.prefab
- Altar.prefab
Cette configuration est donc standard dans le projet et ne devrait pas poser de problèmes de performance particuliers puisqu'elle est déjà éprouvée sur d'autres interfaces.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Vérifier si d'autres Canvas utilisent des configurations similaires rg -l "m_AdditionalShaderChannelsFlag: 25" --type yamlLength of output: 205
Script:
#!/bin/bash # Search for any Canvas shader channel configurations in yaml/prefab files fd -e prefab -e yaml -x rg -l "m_AdditionalShaderChannelsFlag:" {} # Also search for specific value 25 fd -e prefab -e yaml -x rg -l "m_AdditionalShaderChannelsFlag: 25" {}Length of output: 688
Assets/Scenes/EmptyRoom_2.unity (4)
1230-1231: Racines de scène mises à jour correctement.Les nouveaux pièges ont été correctement ajoutés aux racines de la scène, maintenant une hiérarchie appropriée.
1098-1105: Configuration du tableau de pièges mise à jour.Le tableau trapPrefabs a été étendu pour inclure le piège à ours. Vérifiez que le système de gestion des pièges prend en charge ce nouveau type de piège.
#!/bin/bash # Vérifier l'implémentation du gestionnaire de pièges ast-grep --pattern 'class.*?TrapManager.*?{.*?}'
156-212: Vérifiez le placement du piège à ours.Le piège à ours est placé aux coordonnées (6.89, 4.26, 0). Assurez-vous que cette position est accessible au joueur et qu'elle offre une expérience de jeu équilibrée.
443-499: Vérifiez le placement de l'arbalète.L'arbalète est placée aux coordonnées (2.57, 1.72, 0). Assurez-vous qu'elle ne bloque pas le chemin du joueur et qu'elle est correctement alignée avec les autres éléments de la scène.
✅ Verification successful
Position de l'arbalète validée
D'après l'analyse du préfab de l'arbalète et de la scène, la position (2.57, 1.72, 0) semble appropriée :
- L'arbalète est équipée d'un TilemapCollider2D qui empêchera le joueur de la traverser
- Elle est placée à une hauteur accessible tout en laissant suffisamment d'espace pour le passage du joueur
- La direction de tir vers le bas est cohérente avec son placement en hauteur
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Vérifier les autres pièges à proximité pour éviter les chevauchements ast-grep --pattern 'PrefabInstance.*?crossbow.*?m_LocalPosition.*?value.*?[0-9]+'Length of output: 144
Script:
#!/bin/bash # Rechercher les positions des arbalètes dans les scènes Unity rg -U "crossbow.*?prefab.*?m_LocalPosition" --type yamlLength of output: 206
Script:
#!/bin/bash # Rechercher d'autres objets à proximité des coordonnées (2.57, 1.72, 0) rg -U "m_LocalPosition.*?value.*?(2\.[0-9]+|1\.[0-9]+)" --type yamlLength of output: 218
Script:
#!/bin/bash # Vérifier la configuration des collisions pour l'arbalète fd "crossbow.*\.prefab" --exec cat {} \;Length of output: 18563
Script:
#!/bin/bash # Rechercher les éléments de jeu à proximité des coordonnées de l'arbalète rg -U "m_LocalPosition.*?value.*?(2\.5|1\.7)" "Assets/Scenes/EmptyRoom_2.unity"Length of output: 79
Script:
#!/bin/bash # Vérifier la configuration des collisions dans la scène rg -U "Collider2D|Rigidbody2D|m_IsTrigger" "Assets/Scenes/EmptyRoom_2.unity"Length of output: 76
| public class Bear_Trap : MonoBehaviour | ||
| { | ||
| bool playerInTrap = false; | ||
| Animator m_Animator; | ||
| GameObject player; |
There was a problem hiding this comment.
🛠️ Refactor suggestion
Ajoutez des attributs SerializeField pour une meilleure configuration dans l'inspecteur Unity
Les variables privées pourraient bénéficier d'une meilleure visibilité dans l'inspecteur Unity. De plus, les noms des variables devraient suivre les conventions C#.
public class Bear_Trap : MonoBehaviour
{
- bool playerInTrap = false;
- Animator m_Animator;
- GameObject player;
+ [SerializeField] private bool _playerInTrap = false;
+ [SerializeField] private Animator _animator;
+ private GameObject _player;📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| public class Bear_Trap : MonoBehaviour | |
| { | |
| bool playerInTrap = false; | |
| Animator m_Animator; | |
| GameObject player; | |
| public class Bear_Trap : MonoBehaviour | |
| { | |
| [SerializeField] private bool _playerInTrap = false; | |
| [SerializeField] private Animator _animator; | |
| private GameObject _player; |
| void OnTriggerExit2D(Collider2D collision) | ||
| { | ||
| if (collision.gameObject.CompareTag("Player")) | ||
| { | ||
| playerInTrap = false; | ||
| } | ||
| } |
There was a problem hiding this comment.
Effectuez un nettoyage complet lors de la sortie du piège
La méthode ne réinitialise pas tous les états nécessaires, ce qui pourrait causer des problèmes de mémoire et d'animation.
void OnTriggerExit2D(Collider2D collision)
{
- if (collision.gameObject.CompareTag("Player"))
+ if (collision.gameObject.CompareTag(PLAYER_TAG))
{
- playerInTrap = false;
+ _playerInTrap = false;
+ _animator.SetBool(IsTouch, false);
+ _player = null;
}
}Committable suggestion was skipped due to low confidence.
| void Start() | ||
| { | ||
| m_Animator = gameObject.GetComponent<Animator>(); | ||
| } |
There was a problem hiding this comment.
Sécurisez l'accès au composant Animator
Il est recommandé d'ajouter l'attribut RequireComponent et une vérification de null pour éviter les erreurs potentielles.
+[RequireComponent(typeof(Animator))]
public class Bear_Trap : MonoBehaviour
{
void Start()
{
- m_Animator = gameObject.GetComponent<Animator>();
+ _animator = gameObject.GetComponent<Animator>();
+ if (_animator == null)
+ {
+ Debug.LogError($"Animator manquant sur {gameObject.name}");
+ enabled = false;
+ }
}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| void Start() | |
| { | |
| m_Animator = gameObject.GetComponent<Animator>(); | |
| } | |
| [RequireComponent(typeof(Animator))] | |
| public class Bear_Trap : MonoBehaviour | |
| { | |
| void Start() | |
| { | |
| _animator = gameObject.GetComponent<Animator>(); | |
| if (_animator == null) | |
| { | |
| Debug.LogError($"Animator manquant sur {gameObject.name}"); | |
| enabled = false; | |
| } | |
| } |
| void OnTriggerEnter2D(Collider2D collision) | ||
| { | ||
| if (collision.gameObject.CompareTag("Player")) | ||
| { | ||
| playerInTrap = true; | ||
| m_Animator.SetBool("IsTouch", true); | ||
| player = collision.gameObject; | ||
| } | ||
| } |
There was a problem hiding this comment.
🛠️ Refactor suggestion
Améliorez la détection du joueur et la sécurité des animations
La comparaison directe des tags n'est pas idéale pour la maintenabilité. De plus, il faut valider l'existence du paramètre d'animation.
+ private const string PLAYER_TAG = "Player";
+ private static readonly int IsTouch = Animator.StringToHash("IsTouch");
void OnTriggerEnter2D(Collider2D collision)
{
- if (collision.gameObject.CompareTag("Player"))
+ if (collision.gameObject.CompareTag(PLAYER_TAG))
{
- playerInTrap = true;
- m_Animator.SetBool("IsTouch", true);
- player = collision.gameObject;
+ _playerInTrap = true;
+ _animator.SetBool(IsTouch, true);
+ _player = collision.gameObject;
}
}Committable suggestion was skipped due to low confidence.
| public void TakeTrapDamage() | ||
| { | ||
| Debug.Log(playerInTrap); | ||
| if (playerInTrap) | ||
| { | ||
| player.GetComponent<PlayerHealth>().TakeDamage(1); | ||
| } | ||
| } |
There was a problem hiding this comment.
Renforcez la robustesse et la configurabilité du système de dégâts
La méthode présente plusieurs problèmes potentiels : code de débogage en production, absence de vérification de null, et valeur de dégâts en dur.
+ [SerializeField] private int _trapDamage = 1;
public void TakeTrapDamage()
{
- Debug.Log(playerInTrap);
- if (playerInTrap)
+ if (_playerInTrap && _player != null)
{
- player.GetComponent<PlayerHealth>().TakeDamage(1);
+ var playerHealth = _player.GetComponent<PlayerHealth>();
+ if (playerHealth != null)
+ {
+ playerHealth.TakeDamage(_trapDamage);
+ }
}
}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| public void TakeTrapDamage() | |
| { | |
| Debug.Log(playerInTrap); | |
| if (playerInTrap) | |
| { | |
| player.GetComponent<PlayerHealth>().TakeDamage(1); | |
| } | |
| } | |
| [SerializeField] private int trapDamage = 1; | |
| public void TakeTrapDamage() | |
| { | |
| if (playerInTrap && player != null) | |
| { | |
| var playerHealth = player.GetComponent<PlayerHealth>(); | |
| if (playerHealth != null) | |
| { | |
| playerHealth.TakeDamage(trapDamage); | |
| } | |
| } | |
| } |
| serializedVersion: 3 | ||
| m_TransitionDuration: 0.25 | ||
| m_TransitionOffset: 0 | ||
| m_ExitTime: 0.75 | ||
| m_HasExitTime: 1 | ||
| m_HasFixedDuration: 1 | ||
| m_InterruptionSource: 0 | ||
| m_OrderedInterruption: 1 | ||
| m_CanTransitionToSelf: 1 |
There was a problem hiding this comment.
Améliorer la réactivité de la transition d'animation
La configuration actuelle utilise à la fois HasExitTime et une condition IsTouch, ce qui peut créer un délai indésirable dans l'activation du piège. Pour un piège à ours, la réaction devrait être immédiate lors du contact.
Appliquez ces modifications pour améliorer la réactivité :
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.75
- m_HasExitTime: 1
+ m_HasExitTime: 0
m_HasFixedDuration: 1📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| serializedVersion: 3 | |
| m_TransitionDuration: 0.25 | |
| m_TransitionOffset: 0 | |
| m_ExitTime: 0.75 | |
| m_HasExitTime: 1 | |
| m_HasFixedDuration: 1 | |
| m_InterruptionSource: 0 | |
| m_OrderedInterruption: 1 | |
| m_CanTransitionToSelf: 1 | |
| serializedVersion: 3 | |
| m_TransitionDuration: 0.25 | |
| m_TransitionOffset: 0 | |
| m_ExitTime: 0.75 | |
| m_HasExitTime: 0 | |
| m_HasFixedDuration: 1 | |
| m_InterruptionSource: 0 | |
| m_OrderedInterruption: 1 | |
| m_CanTransitionToSelf: 1 |
| platformSettings: | ||
| - serializedVersion: 3 | ||
| buildTarget: DefaultTexturePlatform | ||
| maxTextureSize: 2048 | ||
| resizeAlgorithm: 0 | ||
| textureFormat: -1 | ||
| textureCompression: 0 | ||
| compressionQuality: 50 | ||
| crunchedCompression: 0 | ||
| allowsAlphaSplitting: 0 | ||
| overridden: 0 | ||
| ignorePlatformSupport: 0 | ||
| androidETC2FallbackOverride: 0 | ||
| forceMaximumCompressionQuality_BC6H_BC7: 0 | ||
| - serializedVersion: 3 | ||
| buildTarget: Standalone | ||
| maxTextureSize: 2048 | ||
| resizeAlgorithm: 0 | ||
| textureFormat: -1 | ||
| textureCompression: 1 | ||
| compressionQuality: 50 | ||
| crunchedCompression: 0 | ||
| allowsAlphaSplitting: 0 | ||
| overridden: 0 | ||
| ignorePlatformSupport: 0 | ||
| androidETC2FallbackOverride: 0 | ||
| forceMaximumCompressionQuality_BC6H_BC7: 0 | ||
| - serializedVersion: 3 | ||
| buildTarget: WebGL | ||
| maxTextureSize: 2048 | ||
| resizeAlgorithm: 0 | ||
| textureFormat: -1 | ||
| textureCompression: 1 | ||
| compressionQuality: 50 | ||
| crunchedCompression: 0 | ||
| allowsAlphaSplitting: 0 | ||
| overridden: 0 | ||
| ignorePlatformSupport: 0 | ||
| androidETC2FallbackOverride: 0 | ||
| forceMaximumCompressionQuality_BC6H_BC7: 0 |
There was a problem hiding this comment.
🛠️ Refactor suggestion
Compression de texture à optimiser selon les plateformes
La compression est désactivée pour DefaultTexturePlatform (textureCompression: 0) mais activée pour Standalone et WebGL (textureCompression: 1). Pour des sprites 2D pixel art, il serait préférable d'utiliser une configuration cohérente.
Appliquez cette modification pour uniformiser la compression :
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
- textureCompression: 0
+ textureCompression: 1
compressionQuality: 50📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| platformSettings: | |
| - serializedVersion: 3 | |
| buildTarget: DefaultTexturePlatform | |
| maxTextureSize: 2048 | |
| resizeAlgorithm: 0 | |
| textureFormat: -1 | |
| textureCompression: 0 | |
| compressionQuality: 50 | |
| crunchedCompression: 0 | |
| allowsAlphaSplitting: 0 | |
| overridden: 0 | |
| ignorePlatformSupport: 0 | |
| androidETC2FallbackOverride: 0 | |
| forceMaximumCompressionQuality_BC6H_BC7: 0 | |
| - serializedVersion: 3 | |
| buildTarget: Standalone | |
| maxTextureSize: 2048 | |
| resizeAlgorithm: 0 | |
| textureFormat: -1 | |
| textureCompression: 1 | |
| compressionQuality: 50 | |
| crunchedCompression: 0 | |
| allowsAlphaSplitting: 0 | |
| overridden: 0 | |
| ignorePlatformSupport: 0 | |
| androidETC2FallbackOverride: 0 | |
| forceMaximumCompressionQuality_BC6H_BC7: 0 | |
| - serializedVersion: 3 | |
| buildTarget: WebGL | |
| maxTextureSize: 2048 | |
| resizeAlgorithm: 0 | |
| textureFormat: -1 | |
| textureCompression: 1 | |
| compressionQuality: 50 | |
| crunchedCompression: 0 | |
| allowsAlphaSplitting: 0 | |
| overridden: 0 | |
| ignorePlatformSupport: 0 | |
| androidETC2FallbackOverride: 0 | |
| forceMaximumCompressionQuality_BC6H_BC7: 0 | |
| platformSettings: | |
| - serializedVersion: 3 | |
| buildTarget: DefaultTexturePlatform | |
| maxTextureSize: 2048 | |
| resizeAlgorithm: 0 | |
| textureFormat: -1 | |
| textureCompression: 1 | |
| compressionQuality: 50 | |
| crunchedCompression: 0 | |
| allowsAlphaSplitting: 0 | |
| overridden: 0 | |
| ignorePlatformSupport: 0 | |
| androidETC2FallbackOverride: 0 | |
| forceMaximumCompressionQuality_BC6H_BC7: 0 | |
| - serializedVersion: 3 | |
| buildTarget: Standalone | |
| maxTextureSize: 2048 | |
| resizeAlgorithm: 0 | |
| textureFormat: -1 | |
| textureCompression: 1 | |
| compressionQuality: 50 | |
| crunchedCompression: 0 | |
| allowsAlphaSplitting: 0 | |
| overridden: 0 | |
| ignorePlatformSupport: 0 | |
| androidETC2FallbackOverride: 0 | |
| forceMaximumCompressionQuality_BC6H_BC7: 0 | |
| - serializedVersion: 3 | |
| buildTarget: WebGL | |
| maxTextureSize: 2048 | |
| resizeAlgorithm: 0 | |
| textureFormat: -1 | |
| textureCompression: 1 | |
| compressionQuality: 50 | |
| crunchedCompression: 0 | |
| allowsAlphaSplitting: 0 | |
| overridden: 0 | |
| ignorePlatformSupport: 0 | |
| androidETC2FallbackOverride: 0 | |
| forceMaximumCompressionQuality_BC6H_BC7: 0 |
| --- !u!1 &3690536653345487166 | ||
| GameObject: | ||
| m_ObjectHideFlags: 0 | ||
| m_CorrespondingSourceObject: {fileID: 0} | ||
| m_PrefabInstance: {fileID: 0} | ||
| m_PrefabAsset: {fileID: 0} | ||
| serializedVersion: 6 | ||
| m_Component: | ||
| - component: {fileID: 8338200564503878847} | ||
| - component: {fileID: 5860404924008639143} | ||
| - component: {fileID: 5577912274743170655} | ||
| m_Layer: 5 | ||
| m_Name: Chrono | ||
| m_TagString: Untagged | ||
| m_Icon: {fileID: 0} | ||
| m_NavMeshLayer: 0 | ||
| m_StaticEditorFlags: 0 | ||
| m_IsActive: 1 | ||
| --- !u!224 &8338200564503878847 | ||
| RectTransform: | ||
| m_ObjectHideFlags: 0 | ||
| m_CorrespondingSourceObject: {fileID: 0} | ||
| m_PrefabInstance: {fileID: 0} | ||
| m_PrefabAsset: {fileID: 0} | ||
| m_GameObject: {fileID: 3690536653345487166} | ||
| m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} | ||
| m_LocalPosition: {x: 0, y: 0, z: 0} | ||
| m_LocalScale: {x: 1, y: 1, z: 1} | ||
| m_ConstrainProportionsScale: 0 | ||
| m_Children: [] | ||
| m_Father: {fileID: 5092284430274364147} | ||
| 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: 671, y: 499.5} | ||
| m_SizeDelta: {x: 200, y: 50} | ||
| m_Pivot: {x: 0.5, y: 0.5} | ||
| --- !u!222 &5860404924008639143 | ||
| CanvasRenderer: | ||
| m_ObjectHideFlags: 0 | ||
| m_CorrespondingSourceObject: {fileID: 0} | ||
| m_PrefabInstance: {fileID: 0} | ||
| m_PrefabAsset: {fileID: 0} | ||
| m_GameObject: {fileID: 3690536653345487166} | ||
| m_CullTransparentMesh: 1 | ||
| --- !u!114 &5577912274743170655 | ||
| MonoBehaviour: | ||
| m_ObjectHideFlags: 0 | ||
| m_CorrespondingSourceObject: {fileID: 0} | ||
| m_PrefabInstance: {fileID: 0} | ||
| m_PrefabAsset: {fileID: 0} | ||
| m_GameObject: {fileID: 3690536653345487166} | ||
| m_Enabled: 1 | ||
| m_EditorHideFlags: 0 | ||
| m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} | ||
| m_Name: | ||
| m_EditorClassIdentifier: | ||
| m_Material: {fileID: 0} | ||
| m_Color: {r: 1, g: 1, b: 1, a: 1} | ||
| m_RaycastTarget: 1 | ||
| m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} | ||
| m_Maskable: 1 | ||
| m_OnCullStateChanged: | ||
| m_PersistentCalls: | ||
| m_Calls: [] | ||
| m_text: Chrono | ||
| m_isRightToLeft: 0 | ||
| m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} | ||
| m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} | ||
| m_fontSharedMaterials: [] | ||
| m_fontMaterial: {fileID: 0} | ||
| m_fontMaterials: [] | ||
| m_fontColor32: | ||
| serializedVersion: 2 | ||
| rgba: 4294967295 | ||
| m_fontColor: {r: 1, g: 1, b: 1, a: 1} | ||
| m_enableVertexGradient: 0 | ||
| m_colorMode: 3 | ||
| m_fontColorGradient: | ||
| topLeft: {r: 1, g: 1, b: 1, a: 1} | ||
| topRight: {r: 1, g: 1, b: 1, a: 1} | ||
| bottomLeft: {r: 1, g: 1, b: 1, a: 1} | ||
| bottomRight: {r: 1, g: 1, b: 1, a: 1} | ||
| m_fontColorGradientPreset: {fileID: 0} | ||
| m_spriteAsset: {fileID: 0} | ||
| m_tintAllSprites: 0 | ||
| m_StyleSheet: {fileID: 0} | ||
| m_TextStyleHashCode: -1183493901 | ||
| m_overrideHtmlColors: 0 | ||
| m_faceColor: | ||
| serializedVersion: 2 | ||
| rgba: 4294967295 | ||
| m_fontSize: 36 | ||
| m_fontSizeBase: 36 | ||
| m_fontWeight: 400 | ||
| m_enableAutoSizing: 0 | ||
| m_fontSizeMin: 18 | ||
| m_fontSizeMax: 72 | ||
| m_fontStyle: 0 | ||
| m_HorizontalAlignment: 1 | ||
| m_VerticalAlignment: 256 | ||
| m_textAlignment: 65535 | ||
| m_characterSpacing: 0 | ||
| m_wordSpacing: 0 | ||
| m_lineSpacing: 0 | ||
| m_lineSpacingMax: 0 | ||
| m_paragraphSpacing: 0 | ||
| m_charWidthMaxAdj: 0 | ||
| m_enableWordWrapping: 1 | ||
| m_wordWrappingRatios: 0.4 | ||
| m_overflowMode: 0 | ||
| m_linkedTextComponent: {fileID: 0} | ||
| parentLinkedComponent: {fileID: 0} | ||
| m_enableKerning: 1 | ||
| m_enableExtraPadding: 0 | ||
| checkPaddingRequired: 0 | ||
| m_isRichText: 1 | ||
| m_parseCtrlCharacters: 1 | ||
| m_isOrthographic: 1 | ||
| m_isCullingEnabled: 0 | ||
| m_horizontalMapping: 0 | ||
| m_verticalMapping: 0 | ||
| m_uvLineOffset: 0 | ||
| m_geometrySortingOrder: 0 | ||
| m_IsTextObjectScaleStatic: 0 | ||
| m_VertexBufferAutoSizeReduction: 0 | ||
| m_useMaxVisibleDescender: 1 | ||
| m_pageToDisplay: 1 | ||
| m_margin: {x: 0, y: 0, z: 0, w: 0} | ||
| m_isUsingLegacyAnimationComponent: 0 | ||
| m_isVolumetricText: 0 | ||
| m_hasFontAssetChanged: 0 | ||
| m_baseMaterial: {fileID: 0} | ||
| m_maskOffset: {x: 0, y: 0, z: 0, w: 0} |
There was a problem hiding this comment.
🛠️ Refactor suggestion
Recommandations pour le composant Chrono
Le texte "Chrono" utilise la police par défaut TextMeshPro. Considérations :
- Aucun script n'est attaché pour mettre à jour le chronomètre
- La taille de police fixe (36) pourrait ne pas être adaptative
Suggestions d'amélioration :
- Ajouter un script pour gérer le chronomètre
- Activer
m_enableAutoSizingpour une meilleure adaptabilité
| --- !u!1 &6865167439467567412 | ||
| GameObject: | ||
| m_ObjectHideFlags: 0 | ||
| m_CorrespondingSourceObject: {fileID: 0} | ||
| m_PrefabInstance: {fileID: 0} | ||
| m_PrefabAsset: {fileID: 0} | ||
| serializedVersion: 6 | ||
| m_Component: | ||
| - component: {fileID: 3541969290695416664} | ||
| - component: {fileID: 3548903198056808642} | ||
| - component: {fileID: 6022610885225331009} | ||
| m_Layer: 5 | ||
| m_Name: "Room N\xB0" | ||
| m_TagString: Untagged | ||
| m_Icon: {fileID: 0} | ||
| m_NavMeshLayer: 0 | ||
| m_StaticEditorFlags: 0 | ||
| m_IsActive: 1 | ||
| --- !u!224 &3541969290695416664 | ||
| RectTransform: | ||
| m_ObjectHideFlags: 0 | ||
| m_CorrespondingSourceObject: {fileID: 0} | ||
| m_PrefabInstance: {fileID: 0} | ||
| m_PrefabAsset: {fileID: 0} | ||
| m_GameObject: {fileID: 6865167439467567412} | ||
| m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} | ||
| m_LocalPosition: {x: 0, y: 0, z: 0} | ||
| m_LocalScale: {x: 1, y: 1, z: 1} | ||
| m_ConstrainProportionsScale: 0 | ||
| m_Children: [] | ||
| m_Father: {fileID: 5092284430274364147} | ||
| 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: 871, y: 499.50006} | ||
| m_SizeDelta: {x: 200, y: 50} | ||
| m_Pivot: {x: 0.5, y: 0.5} | ||
| --- !u!222 &3548903198056808642 | ||
| CanvasRenderer: | ||
| m_ObjectHideFlags: 0 | ||
| m_CorrespondingSourceObject: {fileID: 0} | ||
| m_PrefabInstance: {fileID: 0} | ||
| m_PrefabAsset: {fileID: 0} | ||
| m_GameObject: {fileID: 6865167439467567412} | ||
| m_CullTransparentMesh: 1 | ||
| --- !u!114 &6022610885225331009 | ||
| MonoBehaviour: | ||
| m_ObjectHideFlags: 0 | ||
| m_CorrespondingSourceObject: {fileID: 0} | ||
| m_PrefabInstance: {fileID: 0} | ||
| m_PrefabAsset: {fileID: 0} | ||
| m_GameObject: {fileID: 6865167439467567412} | ||
| m_Enabled: 1 | ||
| m_EditorHideFlags: 0 | ||
| m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} | ||
| m_Name: | ||
| m_EditorClassIdentifier: | ||
| m_Material: {fileID: 0} | ||
| m_Color: {r: 1, g: 1, b: 1, a: 1} | ||
| m_RaycastTarget: 1 | ||
| m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} | ||
| m_Maskable: 1 | ||
| m_OnCullStateChanged: | ||
| m_PersistentCalls: | ||
| m_Calls: [] | ||
| m_text: "Room N\xB0" | ||
| m_isRightToLeft: 0 | ||
| m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} | ||
| m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} | ||
| m_fontSharedMaterials: [] | ||
| m_fontMaterial: {fileID: 0} | ||
| m_fontMaterials: [] | ||
| m_fontColor32: | ||
| serializedVersion: 2 | ||
| rgba: 4294967295 | ||
| m_fontColor: {r: 1, g: 1, b: 1, a: 1} | ||
| m_enableVertexGradient: 0 | ||
| m_colorMode: 3 | ||
| m_fontColorGradient: | ||
| topLeft: {r: 1, g: 1, b: 1, a: 1} | ||
| topRight: {r: 1, g: 1, b: 1, a: 1} | ||
| bottomLeft: {r: 1, g: 1, b: 1, a: 1} | ||
| bottomRight: {r: 1, g: 1, b: 1, a: 1} | ||
| m_fontColorGradientPreset: {fileID: 0} | ||
| m_spriteAsset: {fileID: 0} | ||
| m_tintAllSprites: 0 | ||
| m_StyleSheet: {fileID: 0} | ||
| m_TextStyleHashCode: -1183493901 | ||
| m_overrideHtmlColors: 0 | ||
| m_faceColor: | ||
| serializedVersion: 2 | ||
| rgba: 4294967295 | ||
| m_fontSize: 36 | ||
| m_fontSizeBase: 36 | ||
| m_fontWeight: 400 | ||
| m_enableAutoSizing: 0 | ||
| m_fontSizeMin: 18 | ||
| m_fontSizeMax: 72 | ||
| m_fontStyle: 0 | ||
| m_HorizontalAlignment: 1 | ||
| m_VerticalAlignment: 256 | ||
| m_textAlignment: 65535 | ||
| m_characterSpacing: 0 | ||
| m_wordSpacing: 0 | ||
| m_lineSpacing: 0 | ||
| m_lineSpacingMax: 0 | ||
| m_paragraphSpacing: 0 | ||
| m_charWidthMaxAdj: 0 | ||
| m_enableWordWrapping: 1 | ||
| m_wordWrappingRatios: 0.4 | ||
| m_overflowMode: 0 | ||
| m_linkedTextComponent: {fileID: 0} | ||
| parentLinkedComponent: {fileID: 0} | ||
| m_enableKerning: 1 | ||
| m_enableExtraPadding: 0 | ||
| checkPaddingRequired: 0 | ||
| m_isRichText: 1 | ||
| m_parseCtrlCharacters: 1 | ||
| m_isOrthographic: 1 | ||
| m_isCullingEnabled: 0 | ||
| m_horizontalMapping: 0 | ||
| m_verticalMapping: 0 | ||
| m_uvLineOffset: 0 | ||
| m_geometrySortingOrder: 0 | ||
| m_IsTextObjectScaleStatic: 0 | ||
| m_VertexBufferAutoSizeReduction: 0 | ||
| m_useMaxVisibleDescender: 1 | ||
| m_pageToDisplay: 1 | ||
| m_margin: {x: 0, y: 0, z: 0, w: 0} | ||
| m_isUsingLegacyAnimationComponent: 0 | ||
| m_isVolumetricText: 0 | ||
| m_hasFontAssetChanged: 0 | ||
| m_baseMaterial: {fileID: 0} | ||
| m_maskOffset: {x: 0, y: 0, z: 0, w: 0} |
There was a problem hiding this comment.
🛠️ Refactor suggestion
Recommandations pour le composant Room N°
Le texte "Room N°" présente des configurations similaires au Chrono. Points d'attention :
- Utilisation du caractère spécial "°" dans le nom de l'objet
- Absence de script pour mettre à jour le numéro de salle
Suggestions d'amélioration :
- Renommer l'objet en utilisant uniquement des caractères ASCII
- Ajouter un script pour gérer le numéro de salle
- Activer
m_enableAutoSizingcomme pour le Chrono
* Feature/initialization (#1) * feature: Init repository * chore: add git ignore * chore: Upgrade .gitignore * chore: Remove all ignored files * chore: Removed all files that are in the .gitignore --------- Co-authored-by: Thomas Lamiable <lamiablethomas@gmail.com> * docs: Update README.md * Feature/global map (#3) * feature: Add Timelap and player * fix: fix error with tilemap * feat: First version of Player Movements * feat: First version of animation of the player movements * fix: Update Player prefab to add the animator * feat: Add collisions + modify player prefab * chore: Remove useless folder Art * feature: Add socket connection and linking it to the back-end * fix(player_movement): Fix call between backend and game * feature: Ajout de nombreux assets, modifications de la taille, découpage assets * fix: Global Fixes about the blurring of the components imported * feat: Add first rooms * fix: Fix animations and player asset * feat: Create Third room * fix: Reduce player's hitbox * feature: Ajouts des systèmes de pièges, connections et manager des pièges, animations de la crossbow, ajouts des sprites de l'arrow et de ces effets puis damages, changements tags du joueurs et des walls, changement et ajouts des systèmes de vie du joueurs, changements première phase de l'ui et création de celui-ci * fix: compression des images retirer * revert: Revert changes on the ground.png.meta * revert: Revert changes made on the furnitures * fix: Fix position of map 1 and player collision * fix: Fix rooms placement * fix: Fix arrow physics * feature: Add doors and animations * feature: add door system end remove multiple commentary --------- Co-authored-by: AyakorK <guillaume.moret@yahoo.com> Co-authored-by: Loule | Louis <35641311+Loule95450@users.noreply.github.com> * Feature/addition of corridors (#4) * feature: Add Timelap and player * fix: fix error with tilemap * feat: First version of Player Movements * feat: First version of animation of the player movements * fix: Update Player prefab to add the animator * feat: Add collisions + modify player prefab * chore: Remove useless folder Art * feature: Add socket connection and linking it to the back-end * fix(player_movement): Fix call between backend and game * feature: Ajout de nombreux assets, modifications de la taille, découpage assets * fix: Global Fixes about the blurring of the components imported * feat: Add first rooms * fix: Fix animations and player asset * feat: Create Third room * fix: Reduce player's hitbox * feature: Ajouts des systèmes de pièges, connections et manager des pièges, animations de la crossbow, ajouts des sprites de l'arrow et de ces effets puis damages, changements tags du joueurs et des walls, changement et ajouts des systèmes de vie du joueurs, changements première phase de l'ui et création de celui-ci * fix: compression des images retirer * revert: Revert changes on the ground.png.meta * revert: Revert changes made on the furnitures * fix: Fix position of map 1 and player collision * fix: Fix rooms placement * fix: Fix arrow physics * feature: Add doors and animations * feat: Addition of corridors * feature: add door system end remove multiple commentary --------- Co-authored-by: AyakorK <guillaume.moret@yahoo.com> Co-authored-by: Loule | Louis <35641311+Loule95450@users.noreply.github.com> * feature: First try to add level move in Unity * feat: fix Arrow, upgrade door system * feat: Fix multiple problem * fix: fix door teleport with disable player public selected * feat: Add Menu system, update styling * feat: Add Dialog system, add multiple coroutine for enable or disable dialog box * feat: Level move (#7) * feature: First try to add level move in Unity * feat: fix Arrow, upgrade door system * feat: Fix multiple problem * fix: fix door teleport with disable player public selected * feat: Addition of traps using sockets (#6) * feat: Add auto implementation from website of traps * chore: Add environment variables to UnityProject (#5) * fix: Remove useless Log that was crashed * fix(level_move): Replace hard-coded values with variables for better flexibility Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: Thomas Lamiable <lamiablethomas@gmail.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * feat: Add and fix prefab, add DevRoom prefab * fix: fix door * feat: Add Socket to props to send them to back-end (#8) * feature: First try to add level move in Unity * feat: fix Arrow, upgrade door system * feat: Fix multiple problem * fix: fix door teleport with disable player public selected * feat: Addition of traps using sockets (#6) * feat: Add auto implementation from website of traps * chore: Add environment variables to UnityProject (#5) * fix: Remove useless Log that was crashed * feat: Add link to props using sockets * feat: Add a unique socket system manager --------- Co-authored-by: Thomas Lamiable <lamiablethomas@gmail.com> * hotfix: Delete code duplication * Feature/menu (#11) * merge: Merge menu and develop and fix little issues (#10) * merge: Merge develop to menu (#9) * feat: Level move (#7) * feature: First try to add level move in Unity * feat: fix Arrow, upgrade door system * feat: Fix multiple problem * fix: fix door teleport with disable player public selected * feat: Addition of traps using sockets (#6) * feat: Add auto implementation from website of traps * chore: Add environment variables to UnityProject (#5) * fix: Remove useless Log that was crashed * fix(level_move): Replace hard-coded values with variables for better flexibility Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: Thomas Lamiable <lamiablethomas@gmail.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * feat: Add Socket to props to send them to back-end (#8) * feature: First try to add level move in Unity * feat: fix Arrow, upgrade door system * feat: Fix multiple problem * fix: fix door teleport with disable player public selected * feat: Addition of traps using sockets (#6) * feat: Add auto implementation from website of traps * chore: Add environment variables to UnityProject (#5) * fix: Remove useless Log that was crashed * feat: Add link to props using sockets * feat: Add a unique socket system manager --------- Co-authored-by: Thomas Lamiable <lamiablethomas@gmail.com> --------- Co-authored-by: Thomas Lamiable <lamiablethomas@gmail.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * fix: Remove duplication of code * fix: Fix Idle animation --------- Co-authored-by: Thomas Lamiable <lamiablethomas@gmail.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * revert: Revert changes from EmptyRoom that breaked doors * feat:Some menu option had * feat: Add pause system, return to menu and restart game, fix OnLoadScene in unity for hard reset player state * chore: remove commentary for trap manager --------- Co-authored-by: Guillaume MORET <90462045+AyakorK@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: AyakorK <guillaume.moret@yahoo.com> * fix: remove duplicata room * feat: Add a visual timer prefab (V.1.0) (#12) Co-authored-by: AyakorK <guillaume.moret@yahoo.com> * feat: Add dynamic environment interaction system and new events (#13) - Implement player interaction system with the environment - Add dynamic room system: - Events now added based on room number and corridor-specific stages - Dynamic event generation based on the current floor - New events added: - "Blacksmith" - "Altar" event allowing players to take one item - Introduced IsCorridor detection system for dynamic instantiation and removal of corridor events - Enhance item saving system to persist data across rooms, including inventory, dialogues, and more - Implement full inventory system - Add multiple UI elements, animations, and canvas for visual feedback * fix: add removed line * feat: Add waiting screen and fix some behaviors (#14) * merge: Merge menu and develop and fix little issues (#10) * merge: Merge develop to menu (#9) * feat: Level move (#7) * feature: First try to add level move in Unity * feat: fix Arrow, upgrade door system * feat: Fix multiple problem * fix: fix door teleport with disable player public selected * feat: Addition of traps using sockets (#6) * feat: Add auto implementation from website of traps * chore: Add environment variables to UnityProject (#5) * fix: Remove useless Log that was crashed * fix(level_move): Replace hard-coded values with variables for better flexibility Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: Thomas Lamiable <lamiablethomas@gmail.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * feat: Add Socket to props to send them to back-end (#8) * feature: First try to add level move in Unity * feat: fix Arrow, upgrade door system * feat: Fix multiple problem * fix: fix door teleport with disable player public selected * feat: Addition of traps using sockets (#6) * feat: Add auto implementation from website of traps * chore: Add environment variables to UnityProject (#5) * fix: Remove useless Log that was crashed * feat: Add link to props using sockets * feat: Add a unique socket system manager --------- Co-authored-by: Thomas Lamiable <lamiablethomas@gmail.com> --------- Co-authored-by: Thomas Lamiable <lamiablethomas@gmail.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * fix: Remove duplication of code * fix: Fix Idle animation --------- Co-authored-by: Thomas Lamiable <lamiablethomas@gmail.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * revert: Revert changes from EmptyRoom that breaked doors * feat: V1.0 of WaitingScreen * fix: Fix the way of sending props and remove the SocketManager from the player * fix: Remove the Socket when leaving to the menu * feat: Add the SocketManager to the Menu * fix: Fix player animation and options text --------- Co-authored-by: Thomas Lamiable <lamiablethomas@gmail.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * feat: Add trap persistance through rooms (#15) * feat: Camera Control & Room enlargement (#16) * feat: Try to update the camera of the user (a bit of a disaster by now) * fix: Add good tracker Y limit for camera move, synch HUD with camera move * fix: Fix the camera adapting to the scene * feat: Get the room bigger --------- Co-authored-by: Thomlam <lamiablethomas@gmail.com> * feat: Modify the new room (#17) * fix: Add a missing pillar * fix: Crossbow positions (#18) * fix: Fix the placement of the crossbows * feat: Add hitboxes to crossbows * fix: Remove useless traps spawns * fix: Reorder correctly the crossbow prefabs * Feature/add traps (#19) * feature: Update some animations and system for the player, and add new trap * feat: update EmptyRoom2 for test --------- Co-authored-by: Guillaume MORET <90462045+AyakorK@users.noreply.github.com> --------- Co-authored-by: Loule | Louis <35641311+Loule95450@users.noreply.github.com> Co-authored-by: AyakorK <guillaume.moret@yahoo.com> Co-authored-by: Guillaume MORET <90462045+AyakorK@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
* Feature/initialization (#1) * feature: Init repository * chore: add git ignore * chore: Upgrade .gitignore * chore: Remove all ignored files * chore: Removed all files that are in the .gitignore --------- Co-authored-by: Thomas Lamiable <lamiablethomas@gmail.com> * docs: Update README.md * Feature/global map (#3) * feature: Add Timelap and player * fix: fix error with tilemap * feat: First version of Player Movements * feat: First version of animation of the player movements * fix: Update Player prefab to add the animator * feat: Add collisions + modify player prefab * chore: Remove useless folder Art * feature: Add socket connection and linking it to the back-end * fix(player_movement): Fix call between backend and game * feature: Ajout de nombreux assets, modifications de la taille, découpage assets * fix: Global Fixes about the blurring of the components imported * feat: Add first rooms * fix: Fix animations and player asset * feat: Create Third room * fix: Reduce player's hitbox * feature: Ajouts des systèmes de pièges, connections et manager des pièges, animations de la crossbow, ajouts des sprites de l'arrow et de ces effets puis damages, changements tags du joueurs et des walls, changement et ajouts des systèmes de vie du joueurs, changements première phase de l'ui et création de celui-ci * fix: compression des images retirer * revert: Revert changes on the ground.png.meta * revert: Revert changes made on the furnitures * fix: Fix position of map 1 and player collision * fix: Fix rooms placement * fix: Fix arrow physics * feature: Add doors and animations * feature: add door system end remove multiple commentary --------- Co-authored-by: AyakorK <guillaume.moret@yahoo.com> Co-authored-by: Loule | Louis <35641311+Loule95450@users.noreply.github.com> * Feature/addition of corridors (#4) * feature: Add Timelap and player * fix: fix error with tilemap * feat: First version of Player Movements * feat: First version of animation of the player movements * fix: Update Player prefab to add the animator * feat: Add collisions + modify player prefab * chore: Remove useless folder Art * feature: Add socket connection and linking it to the back-end * fix(player_movement): Fix call between backend and game * feature: Ajout de nombreux assets, modifications de la taille, découpage assets * fix: Global Fixes about the blurring of the components imported * feat: Add first rooms * fix: Fix animations and player asset * feat: Create Third room * fix: Reduce player's hitbox * feature: Ajouts des systèmes de pièges, connections et manager des pièges, animations de la crossbow, ajouts des sprites de l'arrow et de ces effets puis damages, changements tags du joueurs et des walls, changement et ajouts des systèmes de vie du joueurs, changements première phase de l'ui et création de celui-ci * fix: compression des images retirer * revert: Revert changes on the ground.png.meta * revert: Revert changes made on the furnitures * fix: Fix position of map 1 and player collision * fix: Fix rooms placement * fix: Fix arrow physics * feature: Add doors and animations * feat: Addition of corridors * feature: add door system end remove multiple commentary --------- Co-authored-by: AyakorK <guillaume.moret@yahoo.com> Co-authored-by: Loule | Louis <35641311+Loule95450@users.noreply.github.com> * feature: First try to add level move in Unity * feat: fix Arrow, upgrade door system * feat: Fix multiple problem * fix: fix door teleport with disable player public selected * feat: Add Menu system, update styling * feat: Add Dialog system, add multiple coroutine for enable or disable dialog box * feat: Level move (#7) * feature: First try to add level move in Unity * feat: fix Arrow, upgrade door system * feat: Fix multiple problem * fix: fix door teleport with disable player public selected * feat: Addition of traps using sockets (#6) * feat: Add auto implementation from website of traps * chore: Add environment variables to UnityProject (#5) * fix: Remove useless Log that was crashed * fix(level_move): Replace hard-coded values with variables for better flexibility Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: Thomas Lamiable <lamiablethomas@gmail.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * feat: Add and fix prefab, add DevRoom prefab * fix: fix door * feat: Add Socket to props to send them to back-end (#8) * feature: First try to add level move in Unity * feat: fix Arrow, upgrade door system * feat: Fix multiple problem * fix: fix door teleport with disable player public selected * feat: Addition of traps using sockets (#6) * feat: Add auto implementation from website of traps * chore: Add environment variables to UnityProject (#5) * fix: Remove useless Log that was crashed * feat: Add link to props using sockets * feat: Add a unique socket system manager --------- Co-authored-by: Thomas Lamiable <lamiablethomas@gmail.com> * hotfix: Delete code duplication * Feature/menu (#11) * merge: Merge menu and develop and fix little issues (#10) * merge: Merge develop to menu (#9) * feat: Level move (#7) * feature: First try to add level move in Unity * feat: fix Arrow, upgrade door system * feat: Fix multiple problem * fix: fix door teleport with disable player public selected * feat: Addition of traps using sockets (#6) * feat: Add auto implementation from website of traps * chore: Add environment variables to UnityProject (#5) * fix: Remove useless Log that was crashed * fix(level_move): Replace hard-coded values with variables for better flexibility Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: Thomas Lamiable <lamiablethomas@gmail.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * feat: Add Socket to props to send them to back-end (#8) * feature: First try to add level move in Unity * feat: fix Arrow, upgrade door system * feat: Fix multiple problem * fix: fix door teleport with disable player public selected * feat: Addition of traps using sockets (#6) * feat: Add auto implementation from website of traps * chore: Add environment variables to UnityProject (#5) * fix: Remove useless Log that was crashed * feat: Add link to props using sockets * feat: Add a unique socket system manager --------- Co-authored-by: Thomas Lamiable <lamiablethomas@gmail.com> --------- Co-authored-by: Thomas Lamiable <lamiablethomas@gmail.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * fix: Remove duplication of code * fix: Fix Idle animation --------- Co-authored-by: Thomas Lamiable <lamiablethomas@gmail.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * revert: Revert changes from EmptyRoom that breaked doors * feat:Some menu option had * feat: Add pause system, return to menu and restart game, fix OnLoadScene in unity for hard reset player state * chore: remove commentary for trap manager --------- Co-authored-by: Guillaume MORET <90462045+AyakorK@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: AyakorK <guillaume.moret@yahoo.com> * fix: remove duplicata room * feat: Add a visual timer prefab (V.1.0) (#12) Co-authored-by: AyakorK <guillaume.moret@yahoo.com> * feat: Add dynamic environment interaction system and new events (#13) - Implement player interaction system with the environment - Add dynamic room system: - Events now added based on room number and corridor-specific stages - Dynamic event generation based on the current floor - New events added: - "Blacksmith" - "Altar" event allowing players to take one item - Introduced IsCorridor detection system for dynamic instantiation and removal of corridor events - Enhance item saving system to persist data across rooms, including inventory, dialogues, and more - Implement full inventory system - Add multiple UI elements, animations, and canvas for visual feedback * fix: add removed line * feat: Add waiting screen and fix some behaviors (#14) * merge: Merge menu and develop and fix little issues (#10) * merge: Merge develop to menu (#9) * feat: Level move (#7) * feature: First try to add level move in Unity * feat: fix Arrow, upgrade door system * feat: Fix multiple problem * fix: fix door teleport with disable player public selected * feat: Addition of traps using sockets (#6) * feat: Add auto implementation from website of traps * chore: Add environment variables to UnityProject (#5) * fix: Remove useless Log that was crashed * fix(level_move): Replace hard-coded values with variables for better flexibility Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: Thomas Lamiable <lamiablethomas@gmail.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * feat: Add Socket to props to send them to back-end (#8) * feature: First try to add level move in Unity * feat: fix Arrow, upgrade door system * feat: Fix multiple problem * fix: fix door teleport with disable player public selected * feat: Addition of traps using sockets (#6) * feat: Add auto implementation from website of traps * chore: Add environment variables to UnityProject (#5) * fix: Remove useless Log that was crashed * feat: Add link to props using sockets * feat: Add a unique socket system manager --------- Co-authored-by: Thomas Lamiable <lamiablethomas@gmail.com> --------- Co-authored-by: Thomas Lamiable <lamiablethomas@gmail.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * fix: Remove duplication of code * fix: Fix Idle animation --------- Co-authored-by: Thomas Lamiable <lamiablethomas@gmail.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * revert: Revert changes from EmptyRoom that breaked doors * feat: V1.0 of WaitingScreen * fix: Fix the way of sending props and remove the SocketManager from the player * fix: Remove the Socket when leaving to the menu * feat: Add the SocketManager to the Menu * fix: Fix player animation and options text --------- Co-authored-by: Thomas Lamiable <lamiablethomas@gmail.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * feat: Add trap persistance through rooms (#15) * feat: Camera Control & Room enlargement (#16) * feat: Try to update the camera of the user (a bit of a disaster by now) * fix: Add good tracker Y limit for camera move, synch HUD with camera move * fix: Fix the camera adapting to the scene * feat: Get the room bigger --------- Co-authored-by: Thomlam <lamiablethomas@gmail.com> * feat: Modify the new room (#17) * fix: Add a missing pillar * fix: Crossbow positions (#18) * fix: Fix the placement of the crossbows * feat: Add hitboxes to crossbows * fix: Remove useless traps spawns * fix: Reorder correctly the crossbow prefabs * Feature/add traps (#19) * feature: Update some animations and system for the player, and add new trap * feat: update EmptyRoom2 for test --------- Co-authored-by: Guillaume MORET <90462045+AyakorK@users.noreply.github.com> * fix: Trap management & improvements (#21) * fix: Enlarge the gridSizeY to match the room and modify the level of the floor to fix traps * feat: Improve doors and room and traps * feat: Add walls on first room * feat: Add bear_trap to trap manager * hotfix: Remove bear_trap from the EmptyRoom --------- Co-authored-by: Loule | Louis <35641311+Loule95450@users.noreply.github.com> Co-authored-by: Thomas Lamiable <lamiablethomas@gmail.com> Co-authored-by: Thomas Lamiable <86667484+Thomlam@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Summary by CodeRabbit
Notes de version
Nouvelles fonctionnalités
Modifications
Corrections de bugs