2016-11-28 16:55:13 +00:00
|
|
|
|
2017-02-23 03:10:48 +00:00
|
|
|
var Class = require('../../utils/Class');
|
2016-12-07 02:28:22 +00:00
|
|
|
var GameObject = require('../GameObject');
|
2017-02-23 03:10:48 +00:00
|
|
|
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,
|
2017-02-23 17:15:41 +00:00
|
|
|
Components.GetBounds,
|
2017-02-23 03:10:48 +00:00
|
|
|
ImageRender
|
|
|
|
],
|
|
|
|
|
|
|
|
initialize:
|
|
|
|
|
|
|
|
function Image (state, x, y, texture, frame)
|
|
|
|
{
|
|
|
|
GameObject.call(this, state);
|
|
|
|
|
|
|
|
this.setTexture(texture, frame);
|
2017-02-24 01:45:15 +00:00
|
|
|
this.setPosition(x, y);
|
2016-11-28 16:55:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
});
|
2016-12-07 02:28:22 +00:00
|
|
|
|
|
|
|
module.exports = Image;
|