Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Kiwi.State.prototype.create.call(this);
- // DEFINES GROUPS
- this.spaceGroup = new Kiwi.Group(this,'space');
- this.spaceShipGroup = new Kiwi.Group(this,'spaceship');
- // ADD GROUP TO SCOPE
- this.addChild(this.spaceGroup);
- this.addChild(this.spaceShipGroup);
- // DEFINES COMPONENTS
- this.space = new Kiwi.GameObjects.StaticImage(this, this.textures.space);
- this.spaceship = new Kiwi.GameObjects.StaticImage(this, this.textures['spaceship'], 0, 0);
- this.spaceship.scaleToWidth(50);
- this.spaceship.anchorPointY = 0;
- this.spaceship.anchorPointX = 0;
- // ADD COMPONENTS TO GROUP
- this.spaceGroup.addChild(this.space);
- this.spaceShipGroup.addChild(this.spaceship)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement