blob: e5801c16eb0a9145445ec7364579f8e5ab40cf5e (
plain)
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
|
#ifndef KULE_H
#define KULE_H
#include <raylib.h>
typedef struct Tower {
Texture2D* texture;
int damage;
int range;
Vector2 position;
Vector2 size;
Vector2 center;
float cooldown;
float cooldown_max;
} tower_t;
extern Sound BEAM_SOUND;
typedef struct TowerBeam {
Vector2 dest;
Vector2 src;
float live_time;
} tower_beam_t;
tower_t make_tower(int damage, int range, int x, int y, int width, int height, Texture2D *texture);
tower_beam_t make_beam(Vector2 src, Vector2 dest, float live_time);
void draw_tower(tower_t *tower);
void update_tower(tower_t *t, float dt);
#endif
|