Jump to content

Phaser - Access custom function from the otuside


degressor
 Share

Recommended Posts

Hi, I'm new to pharser. I created several functions like move() in the Game.js

 

TestGame.Game.prototype = {
...
  drawPath: function() {
   ...
  }

Everything is working well. No I would like to access the drawPath function from outside oth the class, e.g. <button onlick="TestGame.Game.drawPath()">  but get "is not a function" Error.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...