Update: CC - Entity Loaded - Moorcow (v6a7eh2o29.js) 579 bytes modified
parent
91683f9d90
commit
ddacfb8572
|
@ -109,6 +109,41 @@ GameLib.Event.Subscribe(
|
||||||
}.bind(this)
|
}.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
|
* Plant all our trees - Below code gets generated automatically
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue