From ce5ff1a7d5f4804c28d89d3d800fc70698393471 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Fri, 17 Jan 2020 14:15:32 -0500 Subject: [PATCH] v0.8.0: cleaned up some redundant code in WndStartGame --- .../shatteredpixeldungeon/windows/WndStartGame.java | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndStartGame.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndStartGame.java index 67de794be..85b83cd42 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndStartGame.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndStartGame.java @@ -165,17 +165,8 @@ public class WndStartGame extends Window { super(); this.cl = cl; - - if (cl == HeroClass.WARRIOR){ - hero = new Image(Assets.WARRIOR, 0, 90, 12, 15); - } else if (cl == HeroClass.MAGE){ - hero = new Image(Assets.MAGE, 0, 90, 12, 15); - } else if (cl == HeroClass.ROGUE){ - hero = new Image(Assets.ROGUE, 0, 90, 12, 15); - } else if (cl == HeroClass.HUNTRESS){ - hero = new Image(Assets.HUNTRESS, 0, 90, 12, 15); - } - add(hero); + + add(hero = new Image(cl.spritesheet(), 0, 90, 12, 15)); }