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

Add game Mode #46

Merged
merged 40 commits into from
Mar 28, 2024
Merged

Add game Mode #46

merged 40 commits into from
Mar 28, 2024

Conversation

Vanessamae23
Copy link
Contributor

  • Event handler added
  • A few game entities added
  • Death match mode
  • Capture the flag mode

zheng-ze
zheng-ze previously approved these changes Mar 28, 2024
Copy link
Contributor

@zheng-ze zheng-ze left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment on lines 30 to 42
func outOfBound() -> Bool {
guard let playerComponent = entity?.component(ofType: PlayerComponent.self) else {
return false
}
if playerComponent.player == .ownPlayer && self.position.x > UIScreen.main.bounds.maxX {
// TODO : Change UIScreen
return true
} else if playerComponent.player == .oppositePlayer && self.position.x < UIScreen.main.bounds.minX {
return true
}
return false
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it will be better for this to be in some system?

@Vanessamae23
Copy link
Contributor Author

Changes made based on review

@Vanessamae23 Vanessamae23 merged commit 2ff6152 into cs3217-2324:main Mar 28, 2024
1 check passed
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.

2 participants