summaryrefslogtreecommitdiff
path: root/src/sim/particle_manager/particle.rs
blob: c68d81ed0484d9987d070954604e2bd3c5097e10 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
use glam::Vec2;

use crate::content::materials::MaterialId;

pub struct Particle {
    pub position: Vec2,
    pub velocity: Vec2,
    pub material: MaterialId,
    pub life: f32,
}

impl Particle {
    pub fn new(position: Vec2, velocity: Vec2, material: MaterialId, life: f32) -> Self {
        Particle {
            position,
            velocity,
            material,
            life,
        }
    }
}