Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package ;
- import ncw.Bitmap;
- import ncw.Lib;
- import ncw.simple.Game;
- import ncw.simple.Scene;
- import ncw.simple.Entity;
- class Main extends Game {
- public static var someBitmap:Bitmap;
- public function new() {
- super(320, 360);
- background = 0xfff9f9f9;
- someBitmap = Bitmap.load("img/0.png");
- scene = new Scene();
- scene.add(new One());
- }
- public static function main() { new Main(); }
- }
- class One extends Entity {
- //
- public function new() {
- super();
- }
- function onFrame() {
- x += Lib.delta * 4;
- y = game.mouseY;
- }
- function onRender(to:Bitmap) {
- to.draw(Main.someBitmap, x, y);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement