nice data for component update
parent
7f2f35e114
commit
2bc511a614
File diff suppressed because one or more lines are too long
|
@ -1,5 +1,5 @@
|
||||||
// COMPILE TIME DEFINITIONS (Generated via gulp)
|
// 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
|
// END COMPILE TIME DEFINITIONS
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -31079,10 +31079,23 @@ GameLib.System.Linking.prototype.componentUpdate = function(data){
|
||||||
|
|
||||||
var component = GameLib.EntityManager.Instance.findComponentByName(data.name);
|
var component = GameLib.EntityManager.Instance.findComponentByName(data.name);
|
||||||
|
|
||||||
|
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[data.property][data.subProperty] = data.value;
|
||||||
|
}
|
||||||
|
|
||||||
component.updateInstance(data.property);
|
component.updateInstance(data.property);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
GameLib.System.Linking.prototype.componentCloned = function(data) {
|
GameLib.System.Linking.prototype.componentCloned = function(data) {
|
||||||
|
|
|
@ -484,10 +484,23 @@ GameLib.System.Linking.prototype.componentUpdate = function(data){
|
||||||
|
|
||||||
var component = GameLib.EntityManager.Instance.findComponentByName(data.name);
|
var component = GameLib.EntityManager.Instance.findComponentByName(data.name);
|
||||||
|
|
||||||
|
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[data.property][data.subProperty] = data.value;
|
||||||
|
}
|
||||||
|
|
||||||
component.updateInstance(data.property);
|
component.updateInstance(data.property);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
GameLib.System.Linking.prototype.componentCloned = function(data) {
|
GameLib.System.Linking.prototype.componentCloned = function(data) {
|
||||||
|
|
Loading…
Reference in New Issue