New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Touch up collision events and add inventory #13
Conversation
- Add PlayerMonsterContactEvent details - Add Knockback physics effect to MonsterPlayer collisions - Add inventory component and system - Remove separation handler
import Foundation | ||
|
||
class InventoryComponent: Component { | ||
var inventory: [EntityId] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we use a queue data structure here to support O(1) dequeue and enqueue? Maybe we can use Deque<EntityId>
, similar to EventManager.
@@ -6,6 +6,7 @@ class GameBridge { | |||
var scene: SDScene | |||
|
|||
var entitiesMap: [EntityId: SDObject] | |||
var objectMap: [SDObjectId: EntityId] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe can rename to objectsMap? to be consistent with the above variable naming convention
Made the following changes