package;


import flixel.FlxG;
import flixel.FlxSprite;

class PlayerBullet extends FlxSprite {

    static public var speed:Float = 260;

    static public var damageStatic:Float = 1;

    public var damage:Float = 1;

    public function new(x:Float, y:Float) {
        super(x, y);
        loadGraphic("assets/images/player_bullet.png", true, 18, 18);
        antialiasing = false;

        damage = damageStatic;
    }

    override public function update(elapsed:Float):Void {
        super.update(elapsed);

        if (FlxG.random.float() < 0.2 && !inWorldBounds()) {
            kill();
        }
    }


}