mirror of
https://github.com/lubosz/overte.git
synced 2025-04-08 07:22:43 +02:00
fixed CR feedback
This commit is contained in:
parent
7449821a9b
commit
0d636314ba
2 changed files with 1 additions and 10 deletions
|
@ -43,7 +43,6 @@ function draw(deltaTime) {
|
|||
|
||||
var properties = {
|
||||
type: "Sphere",
|
||||
script: "file:///Users/zappoman/Development/HiFi/hifi/examples/entityScripts/changeColorOnCollision.js",
|
||||
collisionsWillMove: true,
|
||||
position: startPosition,
|
||||
dimensions: {x: largeRadius, y: largeRadius, z: largeRadius},
|
||||
|
@ -53,7 +52,7 @@ function draw(deltaTime) {
|
|||
lifetime: 20
|
||||
};
|
||||
|
||||
//Entities.addEntity(properties);
|
||||
Entities.addEntity(properties);
|
||||
numberEntitiesAdded++;
|
||||
}
|
||||
|
||||
|
@ -85,7 +84,6 @@ function draw(deltaTime) {
|
|||
if (numberEntitiesAdded <= MAX_ENTITIES) {
|
||||
var properties = {
|
||||
type: "Sphere",
|
||||
script: "file:///Users/zappoman/Development/HiFi/hifi/examples/entityScripts/changeColorOnCollision.js",
|
||||
collisionsWillMove: true,
|
||||
position: center,
|
||||
dimensions: {x: entitySize, y: entitySize, z: entitySize},
|
||||
|
|
|
@ -9,19 +9,12 @@
|
|||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
|
||||
print("changeColorOnCollision.js");
|
||||
|
||||
(function(){
|
||||
function getRandomInt(min, max) {
|
||||
return Math.floor(Math.random() * (max - min + 1)) + min;
|
||||
}
|
||||
|
||||
this.preload = function(myID) {
|
||||
print("changeColorOnCollision.js--- preload!!!");
|
||||
};
|
||||
|
||||
this.collisionWithEntity = function(myID, otherID, collisionInfo) {
|
||||
print("collisionWithEntity");
|
||||
Entities.editEntity(myID, { color: { red: getRandomInt(128,255), green: getRandomInt(128,255), blue: getRandomInt(128,255)} });
|
||||
};
|
||||
})
|
Loading…
Reference in a new issue