Jump to content

Search the Community

Showing results for tags 'matter.js json'.

  • 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. preload(){ this.load.atlas('sheet','img/images.png','img/images.json'); this.load.json('shapes','img/shapes.json'); } create() { this.shapes = this.cache.json.get('shapes'); this.platform = this.matter.add.sprite(x,y,'sheet','platform.png',{ shape: this.shapes.platform}); // add sprite this.bottle = this.matter.add.sprite(this.width/2,this.height-24-16,'sheet','Bottle.png',{ shape: this.shapes.Bottle}); this.bottle.setBounce(0.5,0.75); // for(let i=0;i<5;i++){ // let x = 64+Math.floor(Math.random()*(this.width-64)); // let platform = this.matter.add.sprite(x,2*this.height/3 - i*156,'sheet','platform.png',{ shape: this.shapes.platform}); // } } First of all my English a little bad sorry for that. When i add platform and bottle on the screen it working properly. But when i want to create one more platform same code after the bottle create it doesnt work. If i try to add before the bottle it work good. i added media that show you wrong working : https://youtu.be/W470LsI9IWI this is the not working : https://youtu.be/1GBtUHbRPiE
×
×
  • Create New...