I’ve created a sprite sheet consisting of four images. Each image shows an arrow pointing in a different direction. In future, we can use the one image and rotate it to suit our needs but this will do for now. The sprites I used are included in this week’s resources/LPC/Weapons folder in the Github repo.
- Creates a new object.
- Sets it position equal to the player’s position using the transform component that is automatically added to all new objects.
- Adds a sprite component and loads the arrow texture.
- Adds the newly created object to the object collection so it is updated and drawn the window.