kelvinblade Posted April 14, 2015 Share Posted April 14, 2015 I am trying to make a sliding menu but I am not sure how to tween the group to slide. this.menuGroup = game.add.group();this.menu = game.add.sprite(game.world.centerX, game.world.height, 'menu');this.menuGroup.add(this.menu);this.menuCloseButton = game.add.sprite(game.world.width, game.world.centerY, 'menuCloseButton');this.menuGroup.add(this.menuCloseButton);this.menuCloseButton.events.onInputDown.add(this.removeMenu, this); game.add.tween(this.menuGroup._container).to({y: game.world.centerY}, 300).start(); It gave me an error saying y doesn't exist for menuGroup. 1) Is this the correct way to do a sliding menu? 2) Also is it possible to group the text labels into the menu group as well? Thanks in advance. Any help is appreciated. Link to comment Share on other sites More sharing options...
grumpygamer Posted April 14, 2015 Share Posted April 14, 2015 I think you have to usegame.add.tween(this.menuGroup.position).to({y: game.world.centerY},300).start();I've built a sliding menu myself, but have not used _container. Link to comment Share on other sites More sharing options...
Recommended Posts