|
group2 0.1.0
CSE 125 Group 2
|
Component attached to projectile entities. More...
#include <Projectile.hpp>
Public Attributes | |
| WeaponType | type = WeaponType::Rifle |
| Weapon that spawned this projectile. | |
| float | damage = 0.0f |
| Damage dealt on hit. | |
| entt::entity | owner = entt::null |
| Entity that fired this projectile. | |
| bool | explosive = false |
| True if the projectile detonates on impact. | |
| float | currentLifeTime = 0.0f |
| Seconds since spawn (destroyed when exceeding max). | |
| float | fuseTimer = -1.0f |
| Countdown; <0 means no fuse (impact-only). | |
| float | bounceRestitution = 0.0f |
| 0 = no bounce. CollisionSystem reflects velocity * this on hit. | |
| bool | sticky = false |
| If true, sets vel=0 on first surface hit and starts fuse. | |
| bool | stuck = false |
| True once attached to a surface or player. | |
| entt::entity | stuckTo = entt::null |
| Player this grenade is stuck to, or null (world). | |
| glm::vec3 | stuckOffset {0.0f} |
| Offset from the host's origin at stick time. | |
| glm::vec3 | tint = {1.0f, 1.0f, 1.0f} |
| Render tint multiplier (cosmetic, client-side). | |
Component attached to projectile entities.
Velocity comes from the entity's Velocity component. World position comes from the entity's Position component.
| float Projectile::bounceRestitution = 0.0f |
0 = no bounce. CollisionSystem reflects velocity * this on hit.
| float Projectile::currentLifeTime = 0.0f |
Seconds since spawn (destroyed when exceeding max).
| float Projectile::damage = 0.0f |
Damage dealt on hit.
| bool Projectile::explosive = false |
True if the projectile detonates on impact.
| float Projectile::fuseTimer = -1.0f |
Countdown; <0 means no fuse (impact-only).
| entt::entity Projectile::owner = entt::null |
Entity that fired this projectile.
| bool Projectile::sticky = false |
If true, sets vel=0 on first surface hit and starts fuse.
| bool Projectile::stuck = false |
True once attached to a surface or player.
| glm::vec3 Projectile::stuckOffset {0.0f} |
Offset from the host's origin at stick time.
| entt::entity Projectile::stuckTo = entt::null |
Player this grenade is stuck to, or null (world).
| glm::vec3 Projectile::tint = {1.0f, 1.0f, 1.0f} |
Render tint multiplier (cosmetic, client-side).
| WeaponType Projectile::type = WeaponType::Rifle |
Weapon that spawned this projectile.