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

Adds score system #86

Merged
merged 3 commits into from
Nov 22, 2023
Merged

Adds score system #86

merged 3 commits into from
Nov 22, 2023

Conversation

cnmorales
Copy link
Collaborator

@cnmorales cnmorales commented Nov 22, 2023

Issue:

Closes #35

What was done:

  • Adds score system with a multiplier.
  • Killing enemies now grants 10 points
  • Being hit by an arrow resets the multiplier
  • Displays score system in the top left of the screen.

Checklist:

  • Cargo fmt
  • Tested

Copy link
Owner

@mnmaita mnmaita left a comment

Choose a reason for hiding this comment

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

Te dejo dos comments opcionales, a ver que pensas. LGTB! (?

@@ -146,16 +147,22 @@ fn spawn_projectiles(

fn projectile_collision_with_player(
mut commands: Commands,
mut player_query: Query<(Entity, &mut ResourcePool<Health>), With<Player>>,
mut player_query: Query<
(Entity, &mut ResourcePool<Health>, &mut ScoreSystem<Score>),
Copy link
Owner

Choose a reason for hiding this comment

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

Creo que ya no hace falta que traigas el ScoreSystem aca no? Si es asi aprovecha y borralo asi querias menos cosas.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Solved!

Comment on lines +108 to +109
score_system.add_with_multiplier(*points);
score_system.increase_multiplier_by_one();
Copy link
Owner

Choose a reason for hiding this comment

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

No se que opinas pero quizas estaria bueno desacoplar la suba del multiplicador de la suma de puntos. Por ej, se me ocurre que solo los edificios te den multiplicador, que son mas dificiles de romper, a que cada enemigo te sume el X. Me suena que si empezamos a spawnear bichos a lo loco con el pasar del tiempo, los numeros se van a ir al re choto. 😆

@mnmaita mnmaita merged commit 91a5f70 into main Nov 22, 2023
3 checks passed
@mnmaita mnmaita deleted the feature/scoring-system branch November 22, 2023 20:20
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.

High Score System
2 participants