added camera and removed old sound dident work whit the sound system. There is one problem whit the sound system its to quiet

This commit is contained in:
Ziver Koc 2007-03-27 22:51:23 +00:00
parent 28c3cd0529
commit 448fca2fdf
19 changed files with 833 additions and 36 deletions

View file

@ -1,5 +1,6 @@
package ei.game.gamestate;
import ei.engine.LWJGLGameWindow;
import ei.engine.effects.Particles;
import ei.engine.math.Vector2f;
import ei.engine.scene.Node;
@ -27,8 +28,9 @@ public class InGameState extends GameState{
p.setLocation(sprite1.getLocation());
rootNode.add(p);
sound1 = new Sound("sound","data/sounds/test.wav");
sound1.play();
sound1 = new Sound("sound","data/sounds/center.wav");
sound1.loop();
sound1.setLocation(sprite1.getLocation());
rootNode.add(sound1);
}
@ -39,9 +41,8 @@ public class InGameState extends GameState{
@Override
public void update() {
sprite1.getLocation().add(new Vector2f(0.5f,0.5f));
LWJGLGameWindow.getCamera().getLocation().add(new Vector2f(-1.5f,-1.5f));
sprite1.getRotation().add(0, 0, 0.5f);
sound1.getLocation().add(new Vector2f(1,0));
rootNode.update();
}