Skip to content
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

Merged
merged 7 commits into from Mar 20, 2024
Merged

Conversation

HoJunHao2000
Copy link
Contributor

@HoJunHao2000 HoJunHao2000 commented Mar 18, 2024

Made the following changes

  • Add PlayerMonsterContactEvent details
  • Add Knockback physics effect to MonsterPlayer collisions
  • Add inventory component and system
  • Remove separation handler

Junyi00 and others added 3 commits March 17, 2024 22:45
- 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]
Copy link
Contributor

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]
Copy link
Contributor

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

@HoJunHao2000 HoJunHao2000 merged commit 9c94e10 into main Mar 20, 2024
1 check failed
@jasonqiu212 jasonqiu212 deleted the add-collision-events branch March 27, 2024 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants