Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package
- {
- import Box2D.Common.Math.b2Vec2;
- import Box2D.Dynamics.*;
- import flash.display.Sprite;
- import org.flixel.*;
- import org.flixel.easing.*;
- public class MainState extends FlxB2State
- {
- private var body1:FlxB2Sprite;
- private var body2:FlxB2Sprite;
- override public function create():void
- {
- super.create();
- FlxG.bgColor = 0xffffffff;
- var text:FlxText = new FlxText( -100, 10, 50, "Oh Yeah!");
- text.color = 0xFF0000;
- add(text);
- body1 = new FlxB2Sprite(world, 25, 10);
- body1.b2Type = b2Body.b2_dynamicBody;
- body1.b2AngularDamping = 1;
- body1.b2Friction = 1;
- body1.createCircle();
- //body1.fixed = true;
- add(body1);
- body2 = new FlxB2Sprite(world, 50, 100);
- body2.scale = new FlxPoint(2, 2);
- body2.createBox();
- add(body2);
- FlxTween.to(text, 4, { x:150, y:150, angle:720 } , Bounce.easeOut);
- }
- override public function update():void
- {
- super.update();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement