mirror of
https://github.com/photonstorm/phaser
synced 2024-12-18 09:03:29 +00:00
33 lines
691 B
JavaScript
33 lines
691 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.Transform,
|
|
Components.Texture,
|
|
Components.Size,
|
|
Components.Alpha,
|
|
Components.BlendMode,
|
|
Components.ScaleMode,
|
|
Components.Visible,
|
|
Components.GetBounds,
|
|
ImageRender
|
|
],
|
|
|
|
initialize:
|
|
|
|
function Image (state, x, y, texture, frame)
|
|
{
|
|
GameObject.call(this, state);
|
|
|
|
this.setPosition(x, y);
|
|
this.setTexture(texture, frame);
|
|
}
|
|
|
|
});
|
|
|
|
module.exports = Image;
|