zcstover

Members
  • Content Count

    5
  • Joined

  • Last visited

  1. zcstover

    default text object function

    fixed the physics body problem, needed a constructor, but now it says it can't read 'baseTexture'
  2. zcstover

    default text object function

    i'm trying to make a Text object i can call and will build the correct bitmaptext var Text = function(game, target, font) { Phaser.BitmapText.call(this, game, target.x, target.y - target.height /2 , font, '', 24); this.anchor.setTo(0.5); console.log(this) } /// //so i can do something like this this.nameDisplay = new Text(game, this, 'font:default'); but it gave me an error that this.updateText is not a function, so i added Text.prototype.updateText = function() { } under the text function, but now it says 'Cannot read property "PhysicsBody" of undefined'
  3. zcstover

    TypeError with Tween

    i knew it was something like that, thanks
  4. zcstover

    TypeError with Tween

    i have an "Uncaught TypeError: this.easingFunction is not a function" function ComLink(game, planet) { Phaser.Sprite.call(this, game,game.width - 179 * 1.5, game.height - 116 * 1.5, 'communications_hud'); this.scale.set(1.5); }; ComLink.prototype = Object.create(Phaser.Sprite.prototype); ComLink.prototype.constructor = Planet; ComLink.tween; ComLink.game; ComLink.prototype.init = function (game) { this.game = game; } ComLink.prototype.close = function () { this.game.add.tween(this).to({y: this.game.height}, 200, 'linear', true).start(); console.log(this); } ... PlayState.create = function () { this.game.add.image(0,0,'background'); this._loadLevel(); } PlayState._loadLevel = function () { ... this.ComLink = new ComLink(this.game); this.game.add.existing(this.ComLink); this.ComLink.init(this.game); this.ComLink.close(this.game); } here's most of the relevant data and here's the log of the comlink resolved