Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class GameWorld extends World
- {
- public var uni:Universe;
- public var tileEnt:Entity;
- public var bg:Backdrop;
- public var bge:Entity;
- public var cl:Backdrop;
- public var cle:Entity;
- public function GameWorld()
- {
- }
- override public function begin():void
- {
- uni = new Universe(500,500);
- bg = new Backdrop(bitimp.bg1_c, true, true);
- bg.scrollX = 0.5;
- bg.scrollY = 0.5;
- bge = new Entity(0,0, bg);
- add(bge);
- cl = new Backdrop(bitimp.clouds_c, true, true);
- cl.scrollX = 0.9;
- cl.scrollY = 0.9;
- cle = new Entity(0,0, cl);
- add(cle);
- var s:String = "";
- while((s = uni.genRoid()) != null) trace(s);
- tileEnt = new Entity(0,0,uni.world);
- add(tileEnt);
- }
- var lastTime:int;
- override public function update():void
- {
- var t:int = getTimer()-lastTime;
- lastTime += t;
- trace(t);
- FP.camera.x += 10;
- FP.camera.y += 10;
- //camera.x = FP
- }
- }
Add Comment
Please, Sign In to add comment