Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package;
- import cpp.Finalizable;
- import flixel.FlxG;
- import flixel.FlxSprite;
- import flixel.tweens.FlxTween;
- import flixel.util.FlxColor;
- import flixel.math.FlxPoint;
- class Block extends FlxSprite
- {
- public var minVelocity:FlxPoint;
- public var swatch:Int;
- public var still:Bool = false;
- public function new(X:Float, Y:Float, Coat:Int)
- {
- super(X,Y);
- //makeGraphic(16, 16, FlxColor.RED);
- solid = true;
- swatch = Coat;
- if (swatch == 0)
- {
- makeGraphic(16, 16, FlxColor.RED);
- }
- if (swatch == 1)
- {
- makeGraphic(16, 16, FlxColor.GREEN);
- }
- if (swatch == 2)
- {
- makeGraphic(16, 16, FlxColor.BLUE);
- }
- }
- override public function update(elapsed:Float):Void
- {
- if (still == false) velocity.y = 100;
- super.update(elapsed);
- }
- override public function kill():Void
- {
- super.kill();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement