Search the Community

Showing results for tags 'previous'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Platform
    • Coding and Game Design
  • Frameworks
    • Phaser 3
    • Phaser 2
    • Pixi.js
    • Babylon.js
    • Panda 2
    • melonJS
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 1 result

  1. Hi all. I have a problem with my game I can't understand. Here the code: function createTitleView() { //Creates title title = game.add.sprite(game.world.centerX, game.world.centerY-60, 'title'); title.anchor = new Phaser.Point(0.5,0.5); title.name= "title"; //Creates play button playBtn = game.add.sprite(game.world.centerX, game.world.centerY+60, 'playBtn'); playBtn.anchor = new Phaser.Point(0.5,0.5) playBtn.name = "play button"; //Creates game view titleView = game.add.group(); titleView.name = "title view"; titleView.add(title); titleView.add(playBtn); //Assigns event listener to play button playBtn.inputEnabled = true; playBtn.events.onInputDown.add(startGame, this);}function startGame() { // Creates the player gameView = game.add.group(); gameView.name = "game view"; unicorn = game.add.sprite(100, 100, 'unicorn'); unicorn.name = "unicorn"; gameView.add(unicorn); // Slides out the title view titleViewSlideOut = game.add.tween(titleView).to({y: -game.world.height}, 500, Phaser.Easing.Exponential.In, true); createGameView();}Now the fact is that the unicorn's position is relative to the playerBtn and moves with it. Why is that if they're on two separate groups? Here is a dump of the titleView Node | Next | Previous | First | Last ---------- | ---------- | ---------- | ---------- | ---------- group | title | credits button | group | play button > title | play button | group | title | title play button | group | title | play button | play button and here is a dump of the game view Node | Next | Previous | First | Last ---------- | ---------- | ---------- | ---------- | ---------- group | unicorn | play button | group | unicorn > unicorn | - | group | unicorn | unicorn As you can see the play button is somehow part of the gameView. How could it be possible?