Skip to content

Instantly share code, notes, and snippets.

View rileyrg's full-sized avatar
💭
Emacs can replace PHPStorm

RichieHH rileyrg

💭
Emacs can replace PHPStorm
  • Hamburg, Germany
View GitHub Profile
(defun rgr/start-erc (&optional p)
(interactive "p")
(when current-prefix-arg (unless (erc-already-logged-in "im.rootdir.de" 6668 (nth 0 (auth-source-user-and-password "bitlbee"))) (erc :server "im.rootdir.de" :nick (nth 0 (auth-source-user-and-password "bitlbee")) :password (nth 1 (auth-source-user-and-password "bitlbee")) :port 6668)))
(when (not (erc-already-logged-in "irc.freenode.net" 6667 (nth 0 (auth-source-user-and-password "freenode"))))(erc :server "irc.freenode.net" :nick (nth 0 (auth-source-user-and-password "freenode")) :password (nth 1 (auth-source-user-and-password "freenode")) :port 6667))
(when (not (erc-already-logged-in "irc.oftc.net" 6667 (nth 0 (auth-source-user-and-password "oftc"))))(erc :server "irc.oftc.net" :nick (nth 0 (auth-source-user-and-password "oftc")) :password (nth 1 (auth-source-user-and-password "oftc")) :port 6667))
public Shape getShapeFromMapObject(MapObject mapObject) {
Shape shape = null;
if (mapObject instanceof RectangleMapObject) {
shape = getRectangle((RectangleMapObject) mapObject);
} else if (mapObject instanceof PolygonMapObject) {
shape = getPolygon((PolygonMapObject) mapObject);
} else if (mapObject instanceof PolylineMapObject) {
shape = getPolyline((PolylineMapObject) mapObject);
} else if (mapObject instanceof EllipseMapObject) {
shape = getCircle((EllipseMapObject) mapObject);
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true
Exception in thread "LWJGL Application" com.badlogic.gdx.utils.GdxRuntimeException: java.lang.NoClassDefFoundError: com/badlogic/gdx/physics/box2d/ContactListener
at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:131)
Caused by: java.lang.NoClassDefFoundError: com/badlogic/gdx/physics/box2d/ContactListener
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
private void addScore(final Integer score) {
this.score += score; // todo look into adding bundles per level
scoreLabel.getActor().setText(HoneyBeez.textBundle.format("score", this.score));
}
protected void resize() {
int width = Gdx.graphics.getWidth();
int height = Gdx.graphics.getHeight();
viewport.update(width, height, false);
hudStage.update(width, height, false);
batch.getShader().setUniformf("u_resolution", width, height);
batch.getShader().setUniformf("u_xscale", (float) width / (float) height);
b2dm.getLightRayHandler().useCustomViewport(viewport.getScreenX(), viewport.getScreenY(), viewport.getScreenWidth(), viewport.getScreenHeight());
camera.resize(batch);
}
public static ObjectMap<String, ParallaxLevel> parallaxLevelFromString = new ObjectMap<String, ParallaxLevel>() {{
put("default", NORMAL);
put("hedge", HEDGE);
put("trees", TREES);
put("sky", SKY);
}};
public static HashMap<ParallaxLevel, Vector2> parallaxValues = new HashMap<ParallaxLevel, Vector2>() {{
put(ParallaxLevel.NORMAL, new Vector2(1f, 1f));
put(ParallaxLevel.HEDGE, new Vector2(1.1f, 1.1f));
public static ObjectMap<String, ParallaxLevel> parallaxLevelFromString = new ObjectMap<String, ParallaxLevel>() {{
put("default", NORMAL);
put("hedge", HEDGE);
put("trees", TREES);
put("sky", SKY);
}};
public static HashMap<ParallaxLevel, Vector2> parallaxValues = new HashMap<ParallaxLevel, Vector2>() {{
put(ParallaxLevel.NORMAL, new Vector2(1f, 1f));
put(ParallaxLevel.HEDGE, new Vector2(1.1f, 1.1f));
@Override
public void clear(GameSpriteBatch batch, float delta) {
Gdx.gl.glClearColor(bgColor.r, bgColor.g, bgColor.b, bgColor.a);
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
viewport = new FitViewport(map.cameraWidth, map.cameraHeight, new GameParallaxCamera(map));
camera = (GameParallaxCamera) viewport.getCamera();
camera.position.set(map.cameraWidth / 2f, map.cameraHeight / 2f, 0);
b2dm.parseSceneObjects(this);
gameObjectManager.init();
desktop:processResources UP-TO-DATE :desktop:classes :desktop:jar :desktop:assemble :desktop:compileTestJava UP-TO-DATE :desktop:processTestResources UP-TO-DATE :desktop:testClasses UP-TO-DATE :desktop:test UP-TO-DATE :desktop:check UP-TO-DATE :desktop:build :ios:compileJava FAILED FAILURE: Build failed with an exception.