Alex G

Members
  • Content Count

    2
  • Joined

  • Last visited

  1. Thanks for answer! I never made before prototyping with JS, though I made OOP with C# and other languages and I know how it works. I want to ask if I can use exact example you wrote. I ask because as I know, this code _construct: function(){this._game = new Phaser.Game(/*parameters*/);}should have listed parameters. Or in JS I can just type /*parameters*/ ?
  2. Hi, I have a Phaser canvas and must connect it to HTML in which it is in. Lets say I have a function var game;window.onload = function() { game = new Phaser.Game(550, 700, Phaser.AUTO, 'phaser_canvas', { preload: preload, create: create }); function phaserFunction(){ // do something }}and I have a function in the HTML container, like a selector <select id="my-selector" onchange="game.phaserFunction()"> <option> anOption</option> <option> anOption</option> </select>and this is not triggering the function inside Phaser code. How can I call the function inside Phaser from outside? I tried using game.functionName() but it doesnt work with selector Thanks!