sdf
This commit is contained in:
parent
7295b4deaf
commit
16541e4a69
@ -58,6 +58,9 @@ const Particle = struct {
|
||||
{
|
||||
self.show = 0;
|
||||
}
|
||||
self.acceleration.a.x = 0;
|
||||
self.acceleration.a.y = 0;
|
||||
self.acceleration.a.z = 0;
|
||||
}
|
||||
pub fn spawn(self:*Self,xaccel : f32,yaccel : f32) void
|
||||
{
|
||||
@ -80,8 +83,8 @@ const Particle = struct {
|
||||
self.velocity.a.y += val;
|
||||
}
|
||||
pub fn applyForce(self : *Self,vec : pr.Vec) void {
|
||||
self.velocity.a.x += vec.a.x;
|
||||
self.velocity.a.y += vec.a.y;
|
||||
self.velocity.a.x += vec.a.x * 0.5;
|
||||
self.velocity.a.y += vec.a.y * 0.5;
|
||||
self.velocity.a.z += vec.a.z;
|
||||
}
|
||||
};
|
||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user