Addded particle engine but it is not finnished yet its some configuration left
This commit is contained in:
parent
01af69cbc8
commit
7c8dba70d1
10 changed files with 577 additions and 33 deletions
|
|
@ -1,5 +1,6 @@
|
|||
package ei.game.gamestate;
|
||||
|
||||
import ei.engine.effects.Particles;
|
||||
import ei.engine.math.Vector2f;
|
||||
import ei.engine.scene.Node;
|
||||
import ei.engine.scene.Sprite;
|
||||
|
|
@ -11,17 +12,23 @@ public class InGameState extends GameState{
|
|||
private Node rootNode;
|
||||
private Sprite sprite1;
|
||||
private Sound sound1;
|
||||
private Particles p;
|
||||
|
||||
public InGameState(String name){
|
||||
super(name);
|
||||
rootNode = new Node("InGameNode");
|
||||
|
||||
sprite1 = new Sprite("tank","data/units/tank.png");
|
||||
sprite1.setScale(new Vector2f(0.5f,0.5f));
|
||||
//sprite1.setScale(new Vector2f(0.5f,0.5f));
|
||||
sprite1.setLocation(new Vector2f(300,300));
|
||||
rootNode.add(sprite1);
|
||||
|
||||
p = new Particles("particle");
|
||||
p.setLocation(sprite1.getLocation());
|
||||
rootNode.add(p);
|
||||
|
||||
sound1 = new Sound("sound","data/sounds/test.wav");
|
||||
sound1.loop();
|
||||
sound1.play();
|
||||
rootNode.add(sound1);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue