Changed Entity to 3d axis and added a fpstimer that calculates the fps
This commit is contained in:
parent
ec551064c4
commit
28c3cd0529
11 changed files with 222 additions and 72 deletions
|
|
@ -1,5 +1,6 @@
|
|||
package ei.engine.sound;
|
||||
|
||||
import ei.engine.math.Vector3f;
|
||||
import ei.engine.scene.Entity;
|
||||
|
||||
/**
|
||||
|
|
@ -13,6 +14,7 @@ public class Sound extends Entity{
|
|||
private int buffer;
|
||||
private int sourceId;
|
||||
private int id;
|
||||
private Vector3f velocity;
|
||||
|
||||
/**
|
||||
* Create a new sound
|
||||
|
|
@ -24,6 +26,7 @@ public class Sound extends Entity{
|
|||
super(name);
|
||||
id = soundId;
|
||||
soundId++;
|
||||
velocity = new Vector3f();
|
||||
this.buffer = SoundLoader.getInstnace().loadSound(ref);
|
||||
}
|
||||
|
||||
|
|
@ -75,10 +78,14 @@ public class Sound extends Entity{
|
|||
public void update() {
|
||||
//AL10.alSource(source.get(0), AL10.AL_POSITION, sourcePos);
|
||||
SoundManager.getInstnace().setSoundLocation(
|
||||
this, getLocation().getX(),getLocation().getY(),0);
|
||||
this, getLocation().getX(),getLocation().getY(),getLocation().getZ());
|
||||
|
||||
}
|
||||
|
||||
public Vector3f getVelocity(){
|
||||
return velocity;
|
||||
}
|
||||
|
||||
/**
|
||||
* unimplamented method
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue