Operation Null Mind 0.4.1
A 2D roguelike top down shooter game made with SDL2
 
Loading...
Searching...
No Matches
Particle Struct Reference

A struct that represents a particle. More...

#include <particles.h>

Public Attributes

Vec2 position
 Current position.
 
Vec2 direction
 Direction of movement.
 
float speed
 Current speed.
 
bool alive
 Whether the particle is alive.
 
float maxLifeTime
 Time particle can live in seconds.
 
float timeAlive
 Time particle has been alive in seconds.
 
SDL_Color color
 Current color (interpolated between start/end)
 
Vec2 size
 Current size (can change over lifetime)
 
float rotation
 Current rotation angle (Not implemented)
 
float rotationSpeed
 Speed of rotation (degrees/second) (Not implemented)
 
Vec2 velocity
 Current velocity vector.
 
Vec2 acceleration
 Current acceleration (affected by gravity)
 
float drag
 Individual drag factor.
 
float initialSpeed
 Starting speed (for reference/reset)
 
SDL_Color initialColor
 Starting color (for reference/reset)
 
Vec2 initialSize
 Starting size (for reference/reset)
 
bool cameraLock
 Whether the particle is locked to the camera.
 
int bounceCount
 Track number of bounces (Not implemented)
 
Collider * collider
 Collider for the particle (Not implemented)
 

Detailed Description

A struct that represents a particle.

Particles are created and managed by a ParticleEmitter.

Member Data Documentation

◆ acceleration

Vec2 Particle::acceleration

Current acceleration (affected by gravity)

◆ alive

bool Particle::alive

Whether the particle is alive.

◆ bounceCount

int Particle::bounceCount

Track number of bounces (Not implemented)

◆ cameraLock

bool Particle::cameraLock

Whether the particle is locked to the camera.

◆ collider

Collider* Particle::collider

Collider for the particle (Not implemented)

◆ color

SDL_Color Particle::color

Current color (interpolated between start/end)

◆ direction

Vec2 Particle::direction

Direction of movement.

◆ drag

float Particle::drag

Individual drag factor.

◆ initialColor

SDL_Color Particle::initialColor

Starting color (for reference/reset)

◆ initialSize

Vec2 Particle::initialSize

Starting size (for reference/reset)

◆ initialSpeed

float Particle::initialSpeed

Starting speed (for reference/reset)

◆ maxLifeTime

float Particle::maxLifeTime

Time particle can live in seconds.

◆ position

Vec2 Particle::position

Current position.

◆ rotation

float Particle::rotation

Current rotation angle (Not implemented)

◆ rotationSpeed

float Particle::rotationSpeed

Speed of rotation (degrees/second) (Not implemented)

◆ size

Vec2 Particle::size

Current size (can change over lifetime)

◆ speed

float Particle::speed

Current speed.

◆ timeAlive

float Particle::timeAlive

Time particle has been alive in seconds.

◆ velocity

Vec2 Particle::velocity

Current velocity vector.

Is calculated every frame via direction and speed


The documentation for this struct was generated from the following file: