group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
Projectile.hpp
Go to the documentation of this file.
1
3
4#pragma once
5
6#include "WeaponState.hpp"
7
8#include <cstdint>
9#include <entt/entt.hpp>
10
12enum class SurfaceType : uint8_t
13{
19};
20
26{
28 float damage = 0.0f;
29 entt::entity owner = entt::null;
30 bool explosive = false;
31 float currentLifeTime = 0.0f;
32};
SurfaceType
Surface material hit by a projectile — drives impact effect parameters.
Definition Projectile.hpp:13
@ Energy
Definition Projectile.hpp:18
@ Wood
Definition Projectile.hpp:17
@ Flesh
Definition Projectile.hpp:16
@ Concrete
Definition Projectile.hpp:15
@ Metal
Definition Projectile.hpp:14
Weapon state component for armed entities.
WeaponType
Weapon type — determines tracer style, damage, sound, and impact effects.
Definition WeaponState.hpp:10
@ Rifle
Fast hitscan/projectile (R301-style capsule tracer).
Definition WeaponState.hpp:11
Component attached to projectile entities.
Definition Projectile.hpp:26
WeaponType type
Weapon that spawned this projectile.
Definition Projectile.hpp:27
float currentLifeTime
Seconds since spawn (destroyed when exceeding max).
Definition Projectile.hpp:31
bool explosive
True if the projectile detonates on impact.
Definition Projectile.hpp:30
entt::entity owner
Entity that fired this projectile.
Definition Projectile.hpp:29
float damage
Damage dealt on hit.
Definition Projectile.hpp:28