2017-03-27 22:10:04 +00:00
|
|
|
|
|
|
|
var Class = require('../../utils/Class');
|
|
|
|
var GameObject = require('../GameObject');
|
2017-07-04 00:59:31 +00:00
|
|
|
var Components = require('../components');
|
2017-03-27 22:10:04 +00:00
|
|
|
|
|
|
|
var Zone = new Class({
|
|
|
|
|
2017-04-05 01:10:48 +00:00
|
|
|
Extends: GameObject,
|
|
|
|
|
2017-03-27 22:10:04 +00:00
|
|
|
Mixins: [
|
|
|
|
Components.GetBounds,
|
|
|
|
Components.Origin,
|
|
|
|
Components.ScaleMode,
|
|
|
|
Components.Size,
|
|
|
|
Components.Transform,
|
2017-06-22 02:19:03 +00:00
|
|
|
Components.ScrollFactor,
|
2017-03-27 22:10:04 +00:00
|
|
|
Components.Visible
|
|
|
|
],
|
|
|
|
|
|
|
|
initialize:
|
|
|
|
|
2017-07-14 13:30:20 +00:00
|
|
|
function Zone (scene, x, y, width, height)
|
2017-03-27 22:10:04 +00:00
|
|
|
{
|
2017-07-14 13:30:20 +00:00
|
|
|
GameObject.call(this, scene, 'Zone');
|
2017-03-27 22:10:04 +00:00
|
|
|
|
|
|
|
this.setPosition(x, y);
|
|
|
|
this.setSize(width, height);
|
|
|
|
this.setOrigin(0);
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
module.exports = Zone;
|