Dummy now hits up constantly. Also fixed a funny bug

Dummy now hits up constantly, and fixed a bug where all other creatures
able for combat, would stop hitting very politely, and wait for the player
to stop.
This commit is contained in:
Allexit 2015-05-10 23:41:48 +03:00
parent 47a1a193a4
commit 48402a31a9
2 changed files with 3 additions and 1 deletions

View File

@ -17,6 +17,7 @@ import com.saltosion.gladiator.systems.MiscManagerSystem;
import com.saltosion.gladiator.systems.PhysicsSystem;
import com.saltosion.gladiator.systems.RenderingSystem;
import com.saltosion.gladiator.util.AppUtil;
import com.saltosion.gladiator.util.Direction;
import com.saltosion.gladiator.util.Global;
import com.saltosion.gladiator.util.Name;
import com.saltosion.gladiator.util.SpriteLoader;
@ -121,6 +122,7 @@ public class GladiatorBrawler extends ApplicationAdapter {
}));
engine.addEntity(dummy);
dummy.getComponent(CCombat.class).inputs.put(Direction.UP, true);
}
public void initializeLevel() {

View File

@ -39,7 +39,7 @@ public class CombatSystem extends EntitySystem {
if (combat.swingCdCounter > 0) {
combat.swingCdCounter -= deltaTime;
} if (combat.swingCdCounter > 0) { return; }
} if (combat.swingCdCounter > 0) { continue; }
// Ready to swing !