prob

Members
  • Content Count

    69
  • Joined

  • Last visited

About prob

  • Rank
    Advanced Member

Recent Profile Visitors

489 profile views
  1. You need to bind or reference the original scope of this within your function being called on pointerdown.
  2. This may be a better way, if it's what you're looking for:
  3. enemies2.getChildren().forEach(function (child) { // tween child });
  4. You might need to post more complete code; not sure what .entries is referencing. Is this.platforms a Phaser GameObject Group? If so, you should probably use the getChildren method: this.platforms.getChildren().forEach(). What does elem log out?
  5. You could use a Mask, as long as you're using WebGL.
  6. prob

    Can't restart game?

    You're starting/launching the MenuScene again (which is running the create function), and it's trying to define the same inputs again, which were already defined. You can use an if statement and check if the input is defined, or just sleep/wake the MenuScene when transitioning to the GameScene.
  7. I'm not sure what you're using to generate your code, but I'd recommend setting up some sort of linting, like ES Lint, with a standard rule set; it'll help format your content to be more readable and make errors and such easier to see. The functions for on 'drop' and 'pointer down' are establishing new scope (this). You can either bind the original scope to the function, or create a reference to it prior and use that.
  8. Existing is a factory function, so your sprite gets added to the updateList, displayList, and associates some other things. Rich did a great write up on Game Object Factories in a recent dev log, here; it outlines how to set up factory functions in your constructor.
  9. No, all the files are bundled with the Cordova app and loaded locally (from file://).
  10. You can use Safari to debug your Cordova app on a connected device (Safari > Develop > Show Web Inspector), which can help you see any errors in the console. There is also the issue of Phaser and XHR loads on Cordova in iOS; you'll need an intermediate server to load content. I'd recommend Ionic Webview.
  11. You'll first want to verify that Cordova is running; from your html file above it will not, as you're not loading cordova.js. You can reference the Cordova helloWorld example for the basic setup of the html file.
  12. prob

    destroy group

    this.commBox.destroy(true); destroyChildren
  13. I'd recommend using the Cordova CLI, as you will get a much better understanding of the Cordova structure and how things are compiled (plugins, platforms, etc). There is a very simple walkthrough of the process here to get started with.
  14. The game is a single canvas element in the page body; you'd need to post your HTML code for the page to see what is going on.
  15. It's actually currently under development (Spine support), hence the note about not using in production; the current status is noted in the latest dev log.