#include <vec2.h>
#include <SDL.h>
Go to the source code of this file.
◆ Lazer
◆ Lazer_Render()
| void Lazer_Render |
( |
Lazer * |
lazer | ) |
|
Renders a lazer with a glowing effect.
- Parameters
-
| startPosition | The starting position of the lazer |
| endPosition | The ending position of the lazer |
| width | The width of the lazer |
| lazer | Pointer to the Lazer struct containing its properties |
◆ Lazer_Update()
| void Lazer_Update |
( |
Lazer * |
lazer | ) |
|
Updates the lazer's position and handles collisions.
- Parameters
-
| startPosition | The starting position of the lazer |
| direction | The direction of the lazer |
| damage | The damage the lazer deals to the player (if not zero) |
- Returns
- Vec2 The end position of the lazer after collision or reaching max distance
- Parameters
-
| lazer | Pointer to the Lazer struct containing its properties |