mirror of
https://github.com/overte-org/overte.git
synced 2025-04-22 09:33:36 +02:00
more debugging
This commit is contained in:
parent
6a01c10453
commit
f83eae4d42
1 changed files with 7 additions and 5 deletions
|
@ -43,7 +43,7 @@ var totalTime = 0;
|
|||
var MINIMUM_LIGHT_INTENSITY = 0.75;
|
||||
var MAXIMUM_LIGHT_INTENSITY = 2.75;
|
||||
var LIGHT_INTENSITY_RANDOMNESS = 0.3;
|
||||
var EPHEMERAL_LIFETIME = 10; // ephemeral entities will live for 10 seconds after script stops running
|
||||
var EPHEMERAL_LIFETIME = 60; // ephemeral entities will live for 60 seconds after script stops running
|
||||
|
||||
var LightMaker = {
|
||||
light: null,
|
||||
|
@ -78,11 +78,13 @@ function update(deltaTime) {
|
|||
intensity += randFloat(-LIGHT_INTENSITY_RANDOMNESS, LIGHT_INTENSITY_RANDOMNESS);
|
||||
var properties = Entities.getEntityProperties(LightMaker.light, ["age", "lifetime"]);
|
||||
//print("props:" +JSON.stringify(properties));
|
||||
print("age:" + properties.age);
|
||||
print("lifetime:" + properties.lifetime);
|
||||
//print("deltaTime:" + deltaTime);
|
||||
//print("age:" + properties.age);
|
||||
//print("lifetime:" + properties.lifetime);
|
||||
var newLifetime = properties.age + EPHEMERAL_LIFETIME;
|
||||
print("newLifetime:" + newLifetime);
|
||||
Entities.editEntity(LightMaker.light, { type: "Light", intensity : intensity, lifetime: newLifetime });
|
||||
//print("newLifetime:" + newLifetime);
|
||||
Entities.editEntity(LightMaker.light, { type: "Light", intensity: intensity, lifetime: newLifetime });
|
||||
//print("packetsToSendCount:" + Entities.packetsToSendCount());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue