Search the Community
Showing results for tags 'game.system.width'.
-
Hello & Thanks; I need some help with my first project: //=================================== game.module( 'game.main' ) .body(function() { game.addAsset('pandaBlk.png'); game.addAsset('pandaOrg.png'); game.createScene('Main', { backgroundColor: 0xb9bec7, init: function() { // game.system.width(480); // game.system.height(640); var pandaBlk = new game.Sprite('pandaBlk.png').center().addTo(this.stage); pandaBlk.visible = true; pandaBlk.position.set(1, 20); //var pandaOrg = new game.Sprite('pandaOrg.png').center().addTo(this.stage); // pandaOrg.position.set(1, 150); // pandaOrg.visible = true; //var tweenPrb = new game.Tween(pandaBlk.position); // tweenPrb.to({x:200}, 1000); // tweenPrb.repeat(2); // tweenPrb.yoyo(); // pandaBlk.scale.set(-1,1); // tweenPrb.start(); } //game.start(); }); }); //=================================== Everything in // (comments), doesn't work. What I want to happen is for pandaBlk.png and pandaOrg.png(starts out as invisible) to traverse from left to right and back to starting point. When pandaBlk returns to starting point, it becomes invisible And then pandaOrg becomes visible and traverses from left to right and back to starting point. Then pandaOrg becomes invisible and pandaBlk becomes visible and continues transversing. Eventually, there will be a Shooter to target only pandaOrg . Eventually, there will be three more sets of Blk/Org creatures. Things I need to know are: Where can I find (docs) valid values for:? // tweenPrb.to({x:200}, 1000); // tweenPrb.repeat(2); // tweenPrb.yoyo(); // pandaBlk.scale.set(-1,1); // tweenPrb.start(); Where does game.system.width(480); belong ? Thanks