- 26 Dec, 2020 2 commits
-
-
Rahix authored
Add a new method to the AngelShiftImpl trait which angel shifts use to configure any shift-specific entities, resources, and ECS systems. As a first implementation, properly implement this for the bottle angel shift and move the `collect_bottledrops` systems here instead of it being a generic system.
-
Rahix authored
The player component hold information which should stay persistent across the game-runs and thus needs to be passed through the different game-states. Do this by instanciating it in the heaven and then passing it through the level-loading state into the in-game state.
-
- 25 Dec, 2020 1 commit
-
-
Sprites were loaded during the level_loading und the level images in InGameState::new() but they were never cleaned up. As soon as the InGameState starts several times, this would lead to a memory leak. This commit contains a separate treatment for sprites and the level images: Since sprites are stored as a global Enum, they will now be initialized only once on the first loading state. When loading the images, they check if the ImageHandle is already registered on the renderer to determine if loading is required. Level foreground and background on the other hand are dynamically loaded in the InGameState. The InGameState got a new attribute `registered_images: Vec<resources::ImageHandle>` which stores all `ImageHandle` of dynamically loaded images. On deinint, they get deregistered from `Rendering`.
-
- 22 Dec, 2020 4 commits
-
-
Rahix authored
This is a temporary measure to provide some interactivity. In the future, we'd want to actually do something more useful here.
-
Simon Goller authored
-
Simon Goller authored
Sprites are now stored in sprites.rs in the Sprite enum. This can be used to generate ImageHandles to generate Sprite entities.
-
Simon Goller authored
Sprites are loaded during loading state and are passed to the ingame state.
-
- 21 Dec, 2020 8 commits
-
-
Rahix authored
Let's hope we don't make them loose it D:
-
Rahix authored
Load all spawn positions from the `spawns` layer in the map SVG and store them as level data. As a first use, make the player spawn at one of the player spawnpoints randomly.
-
Rahix authored
-
Rahix authored
This allows one to debug wrong colliders in-engine. Quite helpful if inkscape messed up the SVG again ...
-
Rahix authored
Control the player with WASD like a pro gamer.
-
Rahix authored
-
Rahix authored
Add plumbing for the most basic player: - A `Player` component to mark the entity which is the player. - A `Player` resource which holds the entity ID of the player. - A `draw_tmp_player_system` to draw the player as a circle (for now). - A `create_player` function to create the player entity. - Update the `moving_system` to put the camera at the player position.
- 19 Dec, 2020 5 commits
-
-
Rahix authored
Due to the camera translation, the clear is currently not actually happening over the entire visible canvas. Reset the transform before clearing to ensure it's working correctly.
-
Rahix authored
Just as an example to build on.
-
Rahix authored
It's only relevant for mouse events so only make it available there.
-
Rahix authored
Don't ever leak the handlers, keep track of them and drop them when they are no longer needed.
-
Rahix authored
We currently have a `state` and a `states` module. This is confusing, rename the state module to `gamestate` to make a more obvious distinction.
-
- 18 Dec, 2020 6 commits
-
-
Rahix authored
-
Rahix authored
-
Rahix authored
Copy the constants from www/src/_rc3-colors.scss to a rust module as well.
-
Simon Goller authored
-
Simon Goller authored
The camera system sets the transform of the canvas. The pixel coordinate of the camera position is centered in the canvas.
-
Simon Goller authored
-
- 17 Dec, 2020 4 commits
-
-
Simon Goller authored
-
Simon Goller authored
-
Simon Goller authored
-
Rahix authored
-
- 14 Dec, 2020 2 commits