23 lines
No EOL
551 B
JavaScript
23 lines
No EOL
551 B
JavaScript
(function(){
|
|
var snowEffectEntity;
|
|
var isSnowFalling = false;
|
|
|
|
var SantaHat = function() {
|
|
|
|
};
|
|
|
|
var LetItSnow = function() {
|
|
isSnowFalling = !isSnowFalling;
|
|
Entities.editEntity(snowEffectEntity, {"isEmitting" : isSnowFalling});
|
|
};
|
|
|
|
SantaHat.prototype = {
|
|
preload : function(entityID) {
|
|
snowEffectEntity = Entities.getChildrenIDs(entityID)[0];
|
|
},
|
|
clickDownOnEntity: function() {
|
|
LetItSnow();
|
|
}
|
|
};
|
|
return new SantaHat();
|
|
}) |