stats: add stat tracking fields to GameState
We can now track kills, items, damage dealt/taken, crits, times hit, potions used, floors reached, and final score in `GameState` for end-game display. This is rather basic for now, but I intend to extend the tracked statistics as we introduce more mechanics. Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I4dcd3e1effd0209268dc56fe4bba4b696a6a6964
This commit is contained in:
parent
ed482e49cc
commit
b749511b7b
1 changed files with 10 additions and 0 deletions
10
src/common.h
10
src/common.h
|
|
@ -150,6 +150,16 @@ typedef struct {
|
||||||
int shake_x;
|
int shake_x;
|
||||||
int shake_y;
|
int shake_y;
|
||||||
AudioAssets sounds;
|
AudioAssets sounds;
|
||||||
|
// Statistics
|
||||||
|
int total_kills;
|
||||||
|
int items_collected;
|
||||||
|
int damage_dealt;
|
||||||
|
int damage_taken;
|
||||||
|
int crits_landed;
|
||||||
|
int times_hit;
|
||||||
|
int potions_used;
|
||||||
|
int floors_reached;
|
||||||
|
int final_score;
|
||||||
} GameState;
|
} GameState;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue