Added Sleep Start and Sleep End events

This commit is contained in:
Richard Davey 2017-11-22 14:13:10 +00:00
parent d5a7579f26
commit f88732cbb7
3 changed files with 42 additions and 1 deletions

View file

@ -0,0 +1,19 @@
var Class = require('../../../utils/Class');
var Event = require('../../../events/Event');
var SleepEndEvent = new Class({
Extends: Event,
initialize:
function SleepEndEvent (event, body)
{
Event.call(this, 'SLEEP_END_EVENT');
this.body = body;
}
});
module.exports = SleepEndEvent;

View file

@ -0,0 +1,20 @@
var Class = require('../../../utils/Class');
var Event = require('../../../events/Event');
var SleepStartEvent = new Class({
Extends: Event,
initialize:
function SleepStartEvent (event, body)
{
Event.call(this, 'SLEEP_START_EVENT');
this.body = body;
}
});
module.exports = SleepStartEvent;

View file

@ -4,6 +4,8 @@ module.exports = {
COLLISION_ACTIVE: require('./CollisionActiveEvent'),
COLLISION_END: require('./CollisionEndEvent'),
COLLISION_START: require('./CollisionStartEvent')
COLLISION_START: require('./CollisionStartEvent'),
SLEEP_END: require('./SleepEndEvent'),
SLEEP_START: require('./SleepStartEvent')
};