phaser/v3/src/gameobjects/image/Image.js
2017-03-15 23:44:39 +00:00

36 lines
775 B
JavaScript

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