Commit 246c0c5f authored by ogomez92's avatar ogomez92

stumped

parent 0911180a
......@@ -11,6 +11,8 @@ class Cone {
this.x =pos.x;
this.y =0;
this.z =pos.z;
this.z=30;
this.x=25;
this.sound=son.create("loop_cone");
this.pan=this.sound.effects.add(panner({
panningModel: 'HRTF',
......
......@@ -67,6 +67,8 @@ this.xWall=0;
for (const i of this.world.contents.static) {
if (this.rx==i.x && this.rz==i.z) {
i.collide();
i.destroy();
this.world.contents.static.splice(this.world.contents.static.indexOf(i));
}
}
if (this.stepCounter >= 1) {
......
......@@ -24,7 +24,8 @@ export default class World {
this.level=1;
}
set level(v) {
for (let i=1;i<=v*(this.size/2);i++) {
//for (let i=1;i<=v*(this.size/2);i++) {
for (let i=1;i<=1;i++) {
this.contents.static.push(new Cone(this));
}
}
......@@ -37,6 +38,7 @@ this.contents.static.push(new Cone(this));
render() {
panner.setListenerPosition(this.player.x,this.player.y,this.player.z);
//panner.setListenerOrientation(Math.sin(this.player.alpha), 0, Math.cos(this.player.alpha));
panner.setListenerOrientation(Math.sin(this.player.alpha), 0, Math.cos(this.player.alpha));
for (const i of this.contents.dynamic) {
if (typeof i.sound !== undefined) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment