jeudi 24 septembre 2020

Design pattern for game inventory?

Does anyone know of a design pattern that may fit this description?

There will be a focus controller which highlights and focuses an object in a game based on where the player is in the world.

The inventory will have X number of slots. The player may activate any of the slots which contain an item. When the slot is activated, depending on what is currently in focus, will affect the object in focus. I would also want to include items which affects the player, like a passive effect.

Seems like a combination of command, decorator and facade pattern.

Aucun commentaire:

Enregistrer un commentaire