mirror of
https://github.com/photonstorm/phaser
synced 2025-01-13 13:48:53 +00:00
77 lines
2 KiB
JavaScript
77 lines
2 KiB
JavaScript
|
/**
|
||
|
* @author Richard Davey <rich@photonstorm.com>
|
||
|
* @copyright 2018 Photon Storm Ltd.
|
||
|
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
|
||
|
*/
|
||
|
|
||
|
var Class = require('../../utils/Class');
|
||
|
var Components = require('../components');
|
||
|
var GameObject = require('../GameObject');
|
||
|
var ExternRender = require('./ExternRender');
|
||
|
|
||
|
/**
|
||
|
* @classdesc
|
||
|
* An Extern Game Object.
|
||
|
*
|
||
|
* @class Extern
|
||
|
* @extends Phaser.GameObjects.GameObject
|
||
|
* @memberof Phaser.GameObjects
|
||
|
* @constructor
|
||
|
* @since 3.16.0
|
||
|
*
|
||
|
* @extends Phaser.GameObjects.Components.Alpha
|
||
|
* @extends Phaser.GameObjects.Components.BlendMode
|
||
|
* @extends Phaser.GameObjects.Components.Depth
|
||
|
* @extends Phaser.GameObjects.Components.Flip
|
||
|
* @extends Phaser.GameObjects.Components.Origin
|
||
|
* @extends Phaser.GameObjects.Components.ScaleMode
|
||
|
* @extends Phaser.GameObjects.Components.ScrollFactor
|
||
|
* @extends Phaser.GameObjects.Components.Size
|
||
|
* @extends Phaser.GameObjects.Components.Texture
|
||
|
* @extends Phaser.GameObjects.Components.Tint
|
||
|
* @extends Phaser.GameObjects.Components.Transform
|
||
|
* @extends Phaser.GameObjects.Components.Visible
|
||
|
*
|
||
|
* @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.
|
||
|
*/
|
||
|
var Extern = new Class({
|
||
|
|
||
|
Extends: GameObject,
|
||
|
|
||
|
Mixins: [
|
||
|
Components.Alpha,
|
||
|
Components.BlendMode,
|
||
|
Components.Depth,
|
||
|
Components.Flip,
|
||
|
Components.Origin,
|
||
|
Components.ScaleMode,
|
||
|
Components.ScrollFactor,
|
||
|
Components.Size,
|
||
|
Components.Texture,
|
||
|
Components.Tint,
|
||
|
Components.Transform,
|
||
|
Components.Visible,
|
||
|
ExternRender
|
||
|
],
|
||
|
|
||
|
initialize:
|
||
|
|
||
|
function Extern (scene)
|
||
|
{
|
||
|
GameObject.call(this, scene, 'Extern');
|
||
|
},
|
||
|
|
||
|
preUpdate: function (time, delta)
|
||
|
{
|
||
|
// override this!
|
||
|
},
|
||
|
|
||
|
render: function (renderer, camera, calcMatrix)
|
||
|
{
|
||
|
// override this!
|
||
|
}
|
||
|
|
||
|
});
|
||
|
|
||
|
module.exports = Extern;
|