content/hifi-public/PlanetDropBundle_v1/scripts/entity/default.js
Dale Glass 0d14e5a379 Initial data.
Needs a lot of cleanup. Data has been de-duplicated, and where identical copies existed, one of them
has been replaced with a symlink.

Some files have been excluded, such as binaries, installers and debug dumps. Some of that may still
be present.
2022-02-13 18:59:11 +01:00

44 lines
No EOL
1,018 B
JavaScript

(function(){
var targetType = "bush";
var teleport;
var portalDestination;
var animationURL;
this.enterEntity = function(entityID) {
print("EnterEntity");
};
this.leaveEntity = function(entityID) {
print("leaveEntity");
};
this.getUserData = function() {
if (this.properties.userData) {
this.userData = JSON.parse(this.properties.userData);
} else {
this.userData = {};
}
};
this.updateUserData = function() {
Entities.editEntity(this.entityId, {
userData: JSON.stringify(this.userData)
});
};
this.preload = function(entityId) {
print("!!!! entity preload");
this.entityId = entityId;
this.properties = Entities.getEntityProperties(this.entityId);
this.getUserData();
this.userData.pdType = "bush";
this.userData.pdDescription = "This bush is rather fun!";
this.updateUserData();
};
print("***** Default entity script started.");
});