phaser/v3/src/gameobjects/image/Image.js
photonstorm d804e056ed Renaming from State to Scene internally.
This is one monster update.
2017-07-14 14:50:51 +01:00

42 lines
923 B
JavaScript

var Class = require('../../utils/Class');
var GameObject = require('../GameObject');
var Components = require('../components');
var ImageRender = require('./ImageRender');
var Image = new Class({
Extends: GameObject,
Mixins: [
Components.Alpha,
Components.BlendMode,
Components.Flip,
Components.GetBounds,
Components.Origin,
Components.RenderTarget,
Components.ScaleMode,
Components.ScrollFactor,
Components.Size,
Components.Texture,
Components.Tint,
Components.Transform,
Components.Visible,
ImageRender
],
initialize:
function Image (scene, x, y, texture, frame)
{
GameObject.call(this, scene, 'Image');
this.setTexture(texture, frame);
this.setPosition(x, y);
this.setSizeToFrame();
this.setOrigin();
}
});
module.exports = Image;