phaser/v3/src/gameobjects/zone/Zone.js

34 lines
655 B
JavaScript
Raw Normal View History

2017-03-27 22:10:04 +00:00
var Class = require('../../utils/Class');
var GameObject = require('../GameObject');
var Components = require('../../components');
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:
function Zone (state, x, y, width, height)
{
GameObject.call(this, state, 'Zone');
2017-03-27 22:10:04 +00:00
this.setPosition(x, y);
this.setSize(width, height);
this.setOrigin(0);
}
});
module.exports = Zone;