Fixed Box class and some bugs in texture

This commit is contained in:
Ziver Koc 2007-04-15 18:52:42 +00:00
parent 1f3806b288
commit d2fce2161e
9 changed files with 108 additions and 94 deletions

View file

@ -4,10 +4,13 @@ import ei.engine.LWJGLGameWindow;
import ei.engine.effects.Particles;
import ei.engine.math.Vector2f;
import ei.engine.math.Vector3f;
import ei.engine.math.Vector4f;
import ei.engine.scene.Box;
import ei.engine.scene.Node;
import ei.engine.scene.Sprite;
import ei.engine.sound.Sound;
import ei.engine.state.GameState;
import ei.engine.texture.Texture;
public class GameStateTestState extends GameState{
@ -22,9 +25,17 @@ public class GameStateTestState extends GameState{
sprite1 = new Sprite("tank","data/units/tank.png");
//sprite1.setScale(new Vector2f(0.5f,0.5f));
sprite1.setLocation(new Vector3f(0,0,0.2f));
sprite1.setLocation(new Vector3f(400,300,0.2f));
rootNode.add(sprite1);
Texture tex = new Texture();
tex.setColor(new Vector4f(0.5f, 1.0f, 0.5f,1));
Box box = new Box("box",tex);
box.setLocation(sprite1.getLocation());
box.setRotation(sprite1.getRotation());
box.setSize(sprite1.getSize());
rootNode.add(box);
p = new Particles("particle");
p.setLocation(sprite1.getLocation().getCopy());
p.getLocation().setZ(0.1f);
@ -43,7 +54,7 @@ public class GameStateTestState extends GameState{
@Override
public void update() {
LWJGLGameWindow.getCamera().getLocation().add(new Vector2f(-1.5f,-1.5f));
//LWJGLGameWindow.getCamera().getLocation().add(new Vector2f(-1.5f,-1.5f));
sprite1.getRotation().add(0, 0, 0.5f);
rootNode.update();
}