changed Vector2D to Vector2f insted and added sound but the sound is not finnishd yet.

and added a update method to entity for ex the sound entity to update its position in the 
world. Added loging support to whit MultiPrintStream.java
This commit is contained in:
Ziver Koc 2007-03-15 19:52:28 +00:00
parent b2cf5d543b
commit 9d4810d38e
37 changed files with 1262 additions and 39 deletions

View file

@ -0,0 +1,42 @@
package ei.engine.math;
public class Vector2f {
private float x;
private float y;
public Vector2f(float x, float y){
this.x = x;
this.y = y;
}
/**
* Get the X value
*
* @return the x value in the vector
*/
public float getX(){
return x;
}
/**
* Get the Y value
*
* @return the y value in the vector
*/
public float getY(){
return y;
}
/**
* Add to the vectro
* @param i The amount to add
*/
public void add(float i){
x += i;
y += i;
}
public String toString(){
return "Vector2f["+x+","+y+"]";
}
}

View file

@ -0,0 +1,42 @@
package ei.engine.math;
public class Vector2i {
private int x;
private int y;
public Vector2i(int x, int y){
this.x = x;
this.y = y;
}
/**
* Get the X value
*
* @return the x value in the vector
*/
public int getX(){
return x;
}
/**
* Get the Y value
*
* @return the y value in the vector
*/
public int getY(){
return y;
}
/**
* Add to the vectro
* @param i The amount to add
*/
public void add(int i){
x += i;
y += i;
}
public String toString(){
return "Vector2i["+x+","+y+"]";
}
}