Skip to content
Discussion options

You must be logged in to vote

I do something similar in my game:

"WorldItem" is a physics object that can be dropped into any 2D scene. It exports a PandoraEntity which controls its attributes like appearance, stats, effects etc.

When the player walks close to it, it has logic to add itself to the player's inventory. Inventory then accepts "Item" and it all works perfectly. "Item" is the model representation.

This allows you to base internally everything on Pandora models but then you can interface it with Godot nodes like physics objects by wrapping it (Decorator Pattern)

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by mccrae-ben
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants