mirror of
https://github.com/photonstorm/phaser
synced 2024-12-23 19:43:28 +00:00
31 lines
588 B
JavaScript
31 lines
588 B
JavaScript
|
|
||
|
var Class = require('../../utils/Class');
|
||
|
var GameObject = require('../GameObject');
|
||
|
var Components = require('../../components');
|
||
|
|
||
|
var Zone = new Class({
|
||
|
|
||
|
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);
|
||
|
|
||
|
this.setPosition(x, y);
|
||
|
this.setSize(width, height);
|
||
|
this.setOrigin(0);
|
||
|
}
|
||
|
|
||
|
});
|
||
|
|
||
|
module.exports = Zone;
|