Advertisement
Chornitkot

Untitled

May 23rd, 2018
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  Kiwi.State.prototype.create.call(this);
  2.   // DEFINES GROUPS
  3.   this.spaceGroup = new Kiwi.Group(this,'space');
  4.   this.spaceShipGroup = new Kiwi.Group(this,'spaceship');
  5.  
  6.   // ADD GROUP TO SCOPE
  7.   this.addChild(this.spaceGroup);
  8.   this.addChild(this.spaceShipGroup);
  9.  
  10.   // DEFINES COMPONENTS
  11.   this.space = new Kiwi.GameObjects.StaticImage(this, this.textures.space);
  12.   this.spaceship = new Kiwi.GameObjects.StaticImage(this, this.textures['spaceship'], 0, 0);
  13.  
  14.   this.spaceship.scaleToWidth(50);
  15.   this.spaceship.anchorPointY = 0;
  16.   this.spaceship.anchorPointX = 0;
  17.  
  18.   // ADD COMPONENTS TO GROUP
  19.   this.spaceGroup.addChild(this.space);
  20.   this.spaceShipGroup.addChild(this.spaceship)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement