nice data for component update

beta.r3js.org
-=yb4f310 2017-12-11 13:43:59 +01:00
parent 7f2f35e114
commit 2bc511a614
3 changed files with 34 additions and 8 deletions

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
// COMPILE TIME DEFINITIONS (Generated via gulp)
var __DATE__ = "Mon Dec 11 2017 13:39:17 GMT+0100 (CET)";
var __DATE__ = "Mon Dec 11 2017 13:43:48 GMT+0100 (CET)";
// END COMPILE TIME DEFINITIONS
/**
@ -31079,10 +31079,23 @@ GameLib.System.Linking.prototype.componentUpdate = function(data){
var component = GameLib.EntityManager.Instance.findComponentByName(data.name);
component[data.property][data.subProperty] = data.value;
if (GameLib.Utils.UndefinedOrNull(data.property)) {
console.warn('invalid data format - we expect data.property');
return;
}
if (GameLib.Utils.UndefinedOrNull(data.value)) {
console.warn('invalid data format - we expect data.value');
return;
}
if (GameLib.Utils.UndefinedOrNull(data.subProperty)) {
component[data.property] = data.value;
} else {
component[data.property][data.subProperty] = data.value;
}
component.updateInstance(data.property);
};
GameLib.System.Linking.prototype.componentCloned = function(data) {

View File

@ -484,10 +484,23 @@ GameLib.System.Linking.prototype.componentUpdate = function(data){
var component = GameLib.EntityManager.Instance.findComponentByName(data.name);
component[data.property][data.subProperty] = data.value;
if (GameLib.Utils.UndefinedOrNull(data.property)) {
console.warn('invalid data format - we expect data.property');
return;
}
if (GameLib.Utils.UndefinedOrNull(data.value)) {
console.warn('invalid data format - we expect data.value');
return;
}
if (GameLib.Utils.UndefinedOrNull(data.subProperty)) {
component[data.property] = data.value;
} else {
component[data.property][data.subProperty] = data.value;
}
component.updateInstance(data.property);
};
GameLib.System.Linking.prototype.componentCloned = function(data) {