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

33 lines
622 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,
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;