-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgame_level.h
More file actions
50 lines (42 loc) · 1.04 KB
/
game_level.h
File metadata and controls
50 lines (42 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#pragma once
#include <furi.h>
#include <furi_hal_random.h>
#include <engine/engine.h>
#include <engine/entity.h>
#include <engine/game_manager_i.h>
#include <storage/storage.h>
#include "game.h"
#ifdef __cplusplus
extern "C" {
#endif
struct game_obstacle {
float x;
float y;
float width;
float height;
bool direction;
bool visible;
void (*destructionTask)(void);
};
extern int playerLevel;
#define OBSTACLE_SPEED 0.5f
#define OBSTACLE_WIDTH 9.0f
#define MAX_OBSTACLES 5
extern struct game_obstacle obstacles[MAX_OBSTACLES];
struct game_door {
float x;
float y;
float width;
float height;
bool visible;
int transitionTicks;
char* transitionText;
uint32_t transitionTime;
void (*postTask)(void);
};
void game_level_player_update(Entity* self, GameManager* manager, void* context, Vector* pos);
void game_level_player_render(GameManager* manager, Canvas* canvas, void* context);
void game_level_enemy_render(GameManager* manager, Canvas* canvas, void* context);
#ifdef __cplusplus
}
#endif