oboe.js-demo
Version:
A website for Oboe.js
24 lines (16 loc) • 519 B
JavaScript
var Barrier = (function(){
var Barrier = extend(Thing, function Barrier(name, locations){
Thing.apply(this, arguments);
this.events('reset').on(function(){
this.hasBeenShown = false;
}.bind(this));
});
Barrier.newEvent = 'Barrier';
Barrier.prototype.activateIfNeverShownBefore = function(){
if( !this.hasBeenShown ) {
this.activate();
}
this.hasBeenShown = true;
};
return Barrier;
}());