package com.danitheskunk.skunkworks;

import com.danitheskunk.skunkworks.audio.ISample;
import com.danitheskunk.skunkworks.nodes.NodeSprite;

public class TestNode extends BaseGame {
	private final ISample kick;
	private final NodeSprite sprite;

	public TestNode() {
		super(new Vec2i(1280, 720), "Skunkworks");

		kick = loadSample("demoassets/kick.wav");
		sprite = new NodeSprite();
		sprite.setTexture(loadTexture("demoassets/test.png"));
		sprite.setPos(new Vec2f(100, 100));
		rootNode.add(sprite);
		sprite.tweenPos(new Vec2f(800, 400), 120).delay(60).then(() -> {
			System.out.println("yay! got there! now lets go home");
			sprite.tweenPos(new Vec2f(100, 100), 120);
			playSample(kick);
		});
	}

	public static void main(String[] args) {
		new TestNode().run();
	}
}

