Exercise: Compose an Entity

Let's go through what you’ve learned in this chapter.

We'll cover the following

Problem statement

You’ve an entity with Name and Position components. Create an empty (tag) component named Monster and add it to your game entity.

Coding challenge

Your Cargo.toml file should include the following:

[dependencies]
legion = "=0.3.1"

We encourage you to try solving it yourself before looking at the solution. Here’s some code to get you started:

Get hands-on with 1200+ tech skills courses.