Created
November 21, 2015 17:24
-
-
Save Darkhax/055721e770abea5d0522 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package net.darkhax.test; | |
import com.shc.silenceengine.core.Display; | |
import com.shc.silenceengine.core.Game; | |
import com.shc.silenceengine.core.ResourceLoader; | |
import com.shc.silenceengine.core.ResourceLoader.IProgressRenderCallback; | |
import com.shc.silenceengine.graphics.Batcher; | |
import com.shc.silenceengine.graphics.opengl.Texture; | |
public class Core extends Game { | |
public static void main (String[] args) { | |
Game.DEVELOPMENT = false; | |
new Core().start(); | |
} | |
@Override | |
public void init () { | |
ResourceLoader loader = new ResourceLoader(); | |
Display.setTitle("Test"); | |
String[] values = {"ace", "2", "3", "4", "5", "6", "7", "8", "9", "10", "jack", "queen", "king"}; | |
String[] suites = {"hearts", "diamonds", "clubs", "spades"}; | |
for (String suit : suites) { | |
for (String value : values) { | |
loader.loadResource(Texture.class, "cards/" + value + "_of_" + suit + ".png"); | |
} | |
} | |
loader.setProgressRenderCallback(this::customPorgressCallback); | |
loader.startLoading(); | |
} | |
private void customPorgressCallback (String info, float percent) { | |
} | |
@Override | |
public void update (float delta) { | |
} | |
@Override | |
public void render (float delta, Batcher batcher) { | |
} | |
@Override | |
public void resize () { | |
} | |
@Override | |
public void dispose () { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment