initial commit, kind of working.

This commit is contained in:
2026-10-10 15:50:17 -06:00
commit 4db96b0bae
1041 changed files with 51423 additions and 0 deletions
@@ -0,0 +1,68 @@
package org.flixel
{
public class FlxParticle extends FlxSprite
{
public var lifespan:Number;
public var friction:Number;
public function FlxParticle()
{
super();
this.lifespan = 0;
this.friction = 500;
}
override public function update() : void
{
if(this.lifespan <= 0)
{
return;
}
this.lifespan -= FlxG.elapsed;
if(this.lifespan <= 0)
{
kill();
}
if(touching)
{
if(angularVelocity != 0)
{
angularVelocity = -angularVelocity;
}
}
if(acceleration.y > 0)
{
if(touching & FLOOR)
{
drag.x = this.friction;
if(!(wasTouching & FLOOR))
{
if(velocity.y < -elasticity * 10)
{
if(angularVelocity != 0)
{
angularVelocity *= -elasticity;
}
}
else
{
velocity.y = 0;
angularVelocity = 0;
}
}
}
else
{
drag.x = 0;
}
}
}
public function onEmit() : void
{
}
}
}