summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/src/main/java/coffee/liz/dyl/entities/PlayerFactory.java7
-rw-r--r--core/src/main/resources/log4j2.xml22
2 files changed, 25 insertions, 4 deletions
diff --git a/core/src/main/java/coffee/liz/dyl/entities/PlayerFactory.java b/core/src/main/java/coffee/liz/dyl/entities/PlayerFactory.java
index 8655447..54c5df7 100644
--- a/core/src/main/java/coffee/liz/dyl/entities/PlayerFactory.java
+++ b/core/src/main/java/coffee/liz/dyl/entities/PlayerFactory.java
@@ -15,12 +15,11 @@ public class PlayerFactory {
private static final int PENGUIN_FRAMES_Y = 4;
private static final int PENGUIN_FRAMES_X = 8;
private static final FileHandle FILE = Gdx.files.internal("player.png");
+ private static Texture texture = new Texture(FILE);;
public static Entity addTo(final World<?> world) {
- final Texture texture = new Texture(FILE);
- final TextureRegion[][] tmp = TextureRegion.split(texture,
- texture.getWidth() / PENGUIN_FRAMES_X,
- texture.getHeight() / PENGUIN_FRAMES_Y);
+ final TextureRegion[][] tmp = TextureRegion.split(texture, texture.getWidth() / PENGUIN_FRAMES_X,
+ texture.getHeight() / PENGUIN_FRAMES_Y);
return world.createEntity()
.add(new TextureGraphic(Color.PINK, tmp[0][0].getTexture()))
.add(new Controllable())
diff --git a/core/src/main/resources/log4j2.xml b/core/src/main/resources/log4j2.xml
new file mode 100644
index 0000000..c950747
--- /dev/null
+++ b/core/src/main/resources/log4j2.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Configuration status="WARN" monitorInterval="30">
+ <Appenders>
+ <Console name="Console" target="SYSTEM_OUT">
+ <PatternLayout pattern="%d{HH:mm:ss.SSS} %-5level [%t] %c{1} - %msg%n"/>
+ </Console>
+ </Appenders>
+
+ <Loggers>
+ <Logger name="coffee.liz" level="info" additivity="false">
+ <AppenderRef ref="Console"/>
+ </Logger>
+
+ <Logger name="com.badlogic" level="warn" additivity="false">
+ <AppenderRef ref="Console"/>
+ </Logger>
+
+ <Root level="warn">
+ <AppenderRef ref="Console"/>
+ </Root>
+ </Loggers>
+</Configuration>