Skip to content

Latest commit

 

History

History
13 lines (11 loc) · 1.61 KB

README.md

File metadata and controls

13 lines (11 loc) · 1.61 KB

ECS Platformer

A project made with Unity's ECS that implements a 2D player that can move sideways and jump. With authoring components for game objects and prefabs, matching the ECS components.

Players

When an entity has a Player component, it can also have a PlayerInputState component, abilities will be performed based on the input state. In this project's example implementation, only the player entity with the MyPlayerTag will end up with an input state component at runtime, this is done by the MyPlayerInputSystem.

Abilities

Abilities are implemented as a combination of components and 1 aspect to represent it (the aspect acts as a top level abstraction to contain all the pieces). If they're abilities that make the player perform or do something in response to some input, they will read the input from PlayerInputState component on the same entity (how much to move, should jump or not for example).