rendered paste bodypackage
{
import flash.display.Shape;
import flash.geom.Rectangle;
import org.flixel.FlxSprite
import org.flixel.*;
/**
* ...
* @author
*/
public class bullet extends FlxSprite
{
var savedframe:FlxSprite = new FlxSprite();
var drawShape:Shape = new Shape();
public function bullet(targetPoint, startX, startY)
{
redraw(targetPoint, startX, startY );
}
public function redraw(targetPoint, startX, startY)
{
this.makeGraphic(FlxG.width, FlxG.height,0x0000000);
drawShape.graphics.lineStyle(3, 0xff333333, 1);
drawShape.graphics.moveTo(startX, startY);
drawShape.graphics.lineTo(targetPoint.x,targetPoint.y);
this.pixels.draw(drawShape)
this.x = 0;
this.y = 0;
alpha = 1;
}
public function cleanup() {
if (this.health >0 ){
//i.alpha -= 0.1;
//if (this.alpha <0.1){
this.kill();
}
//}
}
}
}