chewax

Members
  • Content Count

    7
  • Joined

  • Last visited

About chewax

  • Rank
    Newbie

Contact Methods

  • Twitter
    @dwaksman
  1. chewax

    Virtual Joypad Plugin

    Hi guys! I looked around quite a lot regarding virtual joypads and I couldn't find anything open source that really fitted my needs. So i decided to go ahead and do my own joypad. I thought some other might benefit from that. Feel free to fork, and enhance. If you have any questions ill be glad to help you. Here is the link https://github.com/chewax/Phaser-Typescript-Joypad Enjoy! Daniel
  2. Just as temporary solution, i coded this at the beginning of the callback function. var elapsedTime = this.game.time.elapsedSince(this.dieTimer);if (elapsedTime < 100) return;this.dieTimer = this.game.time.time;It appears that 100ms is enough to discard the other spurious calls.
  3. I am having the same problem here. Thanks!
  4. chewax

    Inheritance issue in Typescript

    That worked like a charm!! Thanks!
  5. chewax

    Inheritance issue in Typescript

    Oh great!!! Thanks! Let me check that and will get back to you!
  6. chewax

    Inheritance issue in Typescript

    I am not...i thought that i was automatically initialised upon creating the state...doesn't it?
  7. chewax

    Inheritance issue in Typescript

    Hi, guys. I have been looking in the forum but could not find anything that could help me here. Here is my main game code: module Superhero{ export class Game extends Phaser.Game{ conf: Superhero.Config; ui: Superhero.UI; constructor () { super(Config.gameWidth(), Config.gameHeight(), Phaser.CANVAS, 'sh', null); this.conf = new Superhero.Config(); this.ui = new Superhero.UI(); this.state.add('Boot', Boot, false); this.state.add('Preloader', Preloader, false); this.state.add('Menu', Menu, false); this.state.add('Level1', Level1, false); this.state.start('Boot'); } }}So far so good. However, when I access the game instance from some state (say Level1) my custom properties are not there: this.game.ui = new UI(this.game);I get: error TS2339: Property 'ui' does not exist on type 'Game'. What am i doing wrong. Thanks!!!