Phaser.Creature = function (game, manager, x, y, key){ x = x || 0; y = y || 0; key = key || null ; this.type = Phaser.CREATURE; this.timeDelta = 0.05; this._manager = manager; if (typeof key === 'string') { var texture = game.cache.getPixiTexture(key); } else { var texture = key; } CreatureRenderer.call(this, manager, texture); Phaser.Component.Core.init.call(this, game, x, y); } ; Phaser.Creature.prototype = Object.create(CreatureRenderer.prototype); Phaser.Creature.prototype.constructor = Phaser.Creature; Phaser.Component.Core.install.call(Phaser.Creature.prototype, ['Angle', 'AutoCull', 'BringToTop', 'Destroy', 'FixedToCamera', 'LifeSpan', 'Reset'] ); Phaser.Creature.prototype.preUpdateInWorld = Phaser.Component.InWorld.preUpdate; Phaser.Creature.prototype.preUpdateCore = Phaser.Component.Core.preUpdate; Phaser.Creature.prototype.preUpdate = function (){ if (!this.preUpdateInWorld()) { return false ; } this._manager.Update(this.timeDelta); this.UpdateData(); return this.preUpdateCore(); } ;