fixed CR feedback

This commit is contained in:
ZappoMan 2014-12-08 16:20:39 -08:00
parent 7449821a9b
commit 0d636314ba
2 changed files with 1 additions and 10 deletions

View file

@ -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},

View file

@ -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)} });
};
})