Jump to content

Search the Community

Showing results for tags 'javascript phaser'.

  • 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. I am learning PHASER HTML5 game dev framework based on javascript, during which I came across this piece of code which I am not able to understand var BunnyDefender = {}; BunnyDefender.Boot = function(game) {}; BunnyDefender.Boot.prototype = { preload: function() { //-----to load objects and units before we begin our game this.load.image('preloadbar', 'images/loader_bar.png'); this.load.image('titleimage', 'images/TitleImage.png'); }, create: function() { this.input.addPointer(); this.stage.backgroundColor = '#171642'; this.state.start('Preloader'); // launches preloader from Boot.js } }; Here from what I had learnt about javascript prototyping was that , to add any method to an object or constructor function we used the following syntax/example: function employee(name,jobtitle,born) { this.name=name; this.jobtitle=jobtitle; this.born=born; } var fred=new employee("Fred Flintstone","Caveman",1970); employee.prototype.salary=null; fred.salary=20000; Please help !!!
×
×
  • Create New...