Class ItemFactory
java.lang.Object
com.csse3200.game.entities.factories.items.ItemFactory
Utility factory class for creating item entities in the game.
Each item entity type should have a creation method that returns a corresponding entity.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Entity
createItem
(String texture) Creates and configures a new item entity.
-
Method Details
-
createItem
Creates and configures a new item entity. The item has a texture, physics, and other needed parts. This class is called by other Factories, to add other components as needed.- Parameters:
texture
- texture path of the item's texture- Returns:
- entity representing an item
-