package ei.engine.test;

import ei.engine.LWJGLGameWindow;
import ei.engine.effects.Fade;
import ei.engine.math.Vector3f;
import ei.engine.scene.Node;
import ei.engine.scene.Sprite;

public class FadeTest extends LWJGLGameWindow{
	private Fade fade;
	
	public static void main(String[] args){
		new FadeTest();
	}

	public FadeTest() {
		super("FadeTest");
	}
	
	public void init(){
		fade = new Fade("InGameNode");
		
		Node rootNode = new Node("InGameNode");
		
		Sprite sprite1 = new Sprite("tank","data/units/tank.png");
		//sprite1.setScale(new Vector2f(0.5f,0.5f));
		sprite1.setLocation(new Vector3f(200,200,0.2f));
		rootNode.add(sprite1);

		fade.setEntity(rootNode);
		fade.fadeOut(true);
	}
	
	@Override
	public void render() {
		fade.render();
	}

	@Override
	public void update() {
		super.update();
		fade.update();
	}
}
