Add level reset
parent
f993c6b7ba
commit
aa13a95664
|
@ -0,0 +1,11 @@
|
|||
Add Level Restart Key:
|
||||
- Easiest: Go to end of level to deallocate everything and reconstruct all
|
||||
Add Timer function:
|
||||
- Need to reset on level start
|
||||
Add Level Complete:
|
||||
- When all targets on the level is destroyed
|
||||
- Print a complete text
|
||||
- R to reset, continue to return to menu
|
||||
Add Level start:
|
||||
- countdown before allow player movement
|
||||
- Print Go on screen
|
9
main.c
9
main.c
|
@ -137,6 +137,15 @@ void play_test_level(Camera2D camera){
|
|||
if (IsKeyPressed(KEY_Q)){
|
||||
break;
|
||||
}
|
||||
if (IsKeyPressed(KEY_R)){
|
||||
struct target_obj_node *target_current = target_HEAD;
|
||||
while(target_current){
|
||||
target_current->obj->destroyed = false;
|
||||
target_current = target_current->next;
|
||||
}
|
||||
set_position(&player.kinematic, 400, 100);
|
||||
}
|
||||
|
||||
player_input_check(&player);
|
||||
|
||||
update_squishy(&sqr);
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
#include "header.h"
|
||||
#include <raymath.h>
|
||||
|
||||
#define PLAYER_ACCEL 1600
|
||||
#define AIR_ACCEL 800
|
||||
#define RUN_INIT_SPD 230
|
||||
#define PLAYER_ACCEL 2750
|
||||
#define AIR_ACCEL 900
|
||||
#define RUN_INIT_SPD 250
|
||||
#define JUMP_SPD 350
|
||||
#define GRAV 1200
|
||||
#define DASH_SPD 550
|
||||
#define DASH_SPD 600
|
||||
#define DEFAULT_JUMP_COUNT 1
|
||||
|
||||
static bool allow_move = true;
|
||||
|
|
Loading…
Reference in New Issue