zcstover Posted April 25, 2017 Share Posted April 25, 2017 (edited) 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 Quote ComLink {type: 0, physicsType: 0, position: c.Point, scale: c.Point, pivot: c.Point…}alpha: 1anchor: c.Pointanimations: c.AnimationManagerblendMode: 0body: nullcachedTint: -1cameraOffset: c.Pointchildren: Array(0)customRender: falsedata: Objectevents: c.EventsfilterArea: nullfresh: falsegame: c.GamehitArea: nullignoreChildInput: falsekey: "communications_hud"parent: c.WorldphysicsType: 0pivot: c.Pointposition: c.PointpreviousPosition: c.PointpreviousRotation: 0renderOrderID: 2renderable: truerotation: 0scale: c.Pointshader: nulltexture: b.Texturetint: 16777215tintedTexture: nulltype: 0visible: trueworld: c.PointworldAlpha: 1worldPosition: c.PointworldRotation: -0worldScale: c.PointworldTransform: c.Matrixz: 2_bounds: c.Rectangle_cacheAsBitmap: false_cacheIsDirty: false_cr: 1_currentBounds: null_exists: true_frame: c.Frame_height: 0_mask: null_sr: 0_width: 0angle: (...)bottom: (...)cacheAsBitmap: (...)centerX: (...)centerY: (...)deltaX: (...)deltaY: (...)deltaZ: (...)exists: (...)filters: (...)fixedToCamera: (...)frame: (...)frameName: (...)height: (...)inCamera: (...)inWorld: (...)inputEnabled: (...)left: (...)mask: (...)offsetX: (...)offsetY: (...)right: (...)smoothed: (...)top: (...)width: (...)worldVisible: (...)x: (...)y: (...)__proto__: c.Sprite phaser.js:65787 Uncaught TypeError: this.easingFunction is not a function at c.TweenData.update (phaser.js:65787) at c.Tween.update (phaser.js:65223) at c.TweenManager.update (phaser.js:64388) at c.Game.updateLogic (phaser.js:36339) at c.Game.update (phaser.js:36280) at c.RequestAnimationFrame.updateRAF (phaser.js:61979) at window.requestAnimationFrame.forceSetTimeOut._onLoop (phaser.js:61962) update @ phaser.js:65787 update @ phaser.js:65223 update @ phaser.js:64388 updateLogic @ phaser.js:36339 update @ phaser.js:36280 updateRAF @ phaser.js:61979 window.requestAnimationFrame.forceSetTimeOut._onLoop @ phaser.js:61962 resolved Edited April 25, 2017 by zcstover Link to comment Share on other sites More sharing options...
samid737 Posted April 25, 2017 Share Posted April 25, 2017 try capital L in "linear", it should fix it. Link to comment Share on other sites More sharing options...
zcstover Posted April 25, 2017 Author Share Posted April 25, 2017 i knew it was something like that, thanks Link to comment Share on other sites More sharing options...
Recommended Posts