Operation Null Mind 0.4.1
A 2D roguelike top down shooter game made with SDL2
 
Loading...
Searching...
No Matches
lazer_system.h
Go to the documentation of this file.
1#include <vec2.h>
2#include <SDL.h>
3
4typedef struct Lazer {
5 bool active;
7 Vec2 direction; // Direction of the lazer
9 int width; // Width of the lazer
10 int damage;
11 float lifeTime;
13
22void Lazer_Update(Lazer* lazer);
23
31void Lazer_Render(Lazer* lazer);
void Lazer_Update(Lazer *lazer)
Updates the lazer's position and handles collisions.
Definition lazer_system.c:14
void Lazer_Render(Lazer *lazer)
Renders a lazer with a glowing effect.
Definition lazer_system.c:64
Definition lazer_system.h:4
Vec2 startPosition
Definition lazer_system.h:6
Vec2 direction
Definition lazer_system.h:7
bool active
Definition lazer_system.h:5
int width
Definition lazer_system.h:9
float lifeTime
Definition lazer_system.h:11
Vec2 endPosition
Definition lazer_system.h:8
int damage
Definition lazer_system.h:10
A 2D vector structure.
Definition vec2.h:81
Provides 2D vector functionality for positions, directions, and transformations.