Update: CC - Entity Loaded - Moorcow (v6a7eh2o29.js) 579 bytes modified

beta.r3js.org
-=yb4f310 2017-11-26 21:28:24 +01:00
parent 91683f9d90
commit ddacfb8572
1 changed files with 35 additions and 0 deletions

View File

@ -109,6 +109,41 @@ GameLib.Event.Subscribe(
}.bind(this)
);
this.meshes = {};
this.createMesh = function(meshType, type) {
var mesh = this[type].clone();
var material = this[type].materials[0].clone();
mesh.materials = [material];
this.meshes[meshType].push(
{
inUse : false,
mesh : mesh
}
);
};
for (var n = 0; n < 5; n++) {
this.createMesh(1, 'bull');
}
for (var n = 0; n < 5; n++) {
this.createMesh(2, 'star');
}
for (var n = 0; n < 5; n++) {
this.createMesh(3, 'burger');
}
for (var n = 0; n < 5; n++) {
this.createMesh(4, 'parcel');
}
for (var n = 0; n < 5; n++) {
this.createMesh(5, 'santa');
}
/**
* Plant all our trees - Below code gets generated automatically
*/