Making Entities Intelligent

Learn how to give hit points and add health to the player.

Giving entities hit points

Adding hit points to entities requires a new component type. This is a common theme in ECS design patterns; whenever we want to represent something new about entities, we add a component type.

Now, we add another component type to the src/components.rs.

Get hands-on with 1200+ tech skills courses.