-
Notifications
You must be signed in to change notification settings - Fork 7
Items
86LAK edited this page Aug 17, 2023
·
15 revisions
The ItemFactory is a crucial part of the Entity-Component-System (ECS) architecture within our game. It represents the properties and behaviour of an in-game item. Items can be anything from weapons, tools, plants, to any other interactable objects that players can use or manipulate.
To make items using the ECS approach, components are added to the entity. This modular approach allows shorter and less complicated code.
From the itemFactory.java The constructor for ItemComponent is below (note 3 different constructors)
To add functionality to the item, go to the itemFactory.java and add the relevant component. if the component does not exist you will need to create your own.