Jump to content

Search the Community

Showing results for tags 'groups sprite'.

  • 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 Standards
    • Coding and Game Design
    • Paid Promotion (Buy Banner)
  • Frameworks
    • Pixi.js
    • Phaser 3
    • Phaser 2
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
    • GameMonetize
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered
    • Marketplace (Sell Apps, Websites, Games)

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. In my game I am tracking all player ships as well as all selected ships, which will be a subset of all player ships. I add the ship to the allShips list, then add it to the selectedShip list when selected. After adding it to the second group it seems to be removed from the first group. Is this intended behavior? Example: function create() { game.physics.startSystem(Phaser.Physics.ARCADE); game.world.setBounds(0, 0, 800, 600); this.game.stage.backgroundColor = '#71c5cf'; firstgroup = game.add.group(); secondgroup = game.add.group(); // Add the test fighter testFighter = game.add.sprite(400,200, 'yellowship'); firstgroup.add(testFighter); console.log('FIRST GROUP LENGTH BEFORE ADDING TO SECOND GROUP: ' + firstgroup.length); secondgroup.add(testFighter); console.log('FIRST GROUP LENGTH AFTER ADDING TO SECOND GROUP: ' + firstgroup.length);}Console output: "FIRST GROUP LENGTH BEFORE ADDING TO SECOND GROUP: 1""FIRST GROUP LENGTH AFTER ADDING TO SECOND GROUP: 0" Thanks!
×
×
  • Create New...