mirror of
https://github.com/BreizhHardware/project_sanic.git
synced 2026-05-09 08:15:51 +02:00
[PR #41] [MERGED] Feat(FloatingText) - Implement FloatingText class for displaying temp… #42
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
BreizhHardware/project_sanic#42
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/BreizhHardware/project_sanic/pull/41
Author: @BreizhHardware
Created: 4/10/2025
Status: ✅ Merged
Merged: 4/10/2025
Merged by: @ClementHVT
Base:
dev← Head:dev_felix📝 Commits (6)
1478360Feat(FloatingText) - Implement FloatingText class for displaying temporary messages; update player to manage and draw floating texts on screen; enhance error messages in constant.py and improve code readability.bf17cc7Fix(Enemy) - Correct indentation for player.add_projectiles() call to ensure proper execution flow in event handling.692504dRefactor(Player) - Remove draw_floating_text method and its call in update; streamline floating text management for improved performance.c59fea3Fix(Handler) - Correct parallax effect calculations for background positioning; ensure seamless background movement in all directions.9451e79Feat(Cinematic) - Add Cinematic class for level 1 storytelling; integrate cinematic playback into map loading process and remove redundant cinematic method from MapParser.ed86161Feat(Cinematic) - Update play_cinematic method to accept level name; ensure cinematic plays only for Level 1 and improve event handling during playback.📊 Changes
8 files changed (+162 additions, -70 deletions)
View changed files
📝
src/Database/CheckpointDB.py(+1 -1)📝
src/Entity/Enemy.py(+0 -1)➕
src/Entity/FloatingText.py(+44 -0)📝
src/Entity/Player.py(+9 -1)➕
src/Map/cinematic.py(+89 -0)📝
src/Map/parser.py(+3 -60)📝
src/constant.py(+2 -2)📝
src/handler.py(+14 -5)📄 Description
This pull request introduces a new feature for displaying floating text above the player when certain actions occur, along with some minor code cleanups and improvements.
New Feature: Floating Text
src/Entity/FloatingText.py: Added a new classFloatingTextto handle the creation, updating, and drawing of floating text above the player.src/Entity/Player.py: Integrated theFloatingTextclass into the player entity, including initializing a list of floating texts, updating and drawing them, and adding floating text when the player gains projectiles. [1] [2] [3] [4] [5]src/handler.py: Updated the game handler to draw floating texts during the game loop.Code Cleanups and Improvements
src/Entity/Enemy.py: Removed an unused import statement foros.src/constant.py: Fixed a typo in an error message and enabled vsync for the display surface.src/handler.py: Fixed minor formatting issues and added a missing comma in function calls. [1] [2]🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.