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:
parent
47a1a193a4
commit
48402a31a9
@ -17,6 +17,7 @@ import com.saltosion.gladiator.systems.MiscManagerSystem;
|
|||||||
import com.saltosion.gladiator.systems.PhysicsSystem;
|
import com.saltosion.gladiator.systems.PhysicsSystem;
|
||||||
import com.saltosion.gladiator.systems.RenderingSystem;
|
import com.saltosion.gladiator.systems.RenderingSystem;
|
||||||
import com.saltosion.gladiator.util.AppUtil;
|
import com.saltosion.gladiator.util.AppUtil;
|
||||||
|
import com.saltosion.gladiator.util.Direction;
|
||||||
import com.saltosion.gladiator.util.Global;
|
import com.saltosion.gladiator.util.Global;
|
||||||
import com.saltosion.gladiator.util.Name;
|
import com.saltosion.gladiator.util.Name;
|
||||||
import com.saltosion.gladiator.util.SpriteLoader;
|
import com.saltosion.gladiator.util.SpriteLoader;
|
||||||
@ -121,6 +122,7 @@ public class GladiatorBrawler extends ApplicationAdapter {
|
|||||||
|
|
||||||
}));
|
}));
|
||||||
engine.addEntity(dummy);
|
engine.addEntity(dummy);
|
||||||
|
dummy.getComponent(CCombat.class).inputs.put(Direction.UP, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void initializeLevel() {
|
public void initializeLevel() {
|
||||||
|
@ -39,7 +39,7 @@ public class CombatSystem extends EntitySystem {
|
|||||||
|
|
||||||
if (combat.swingCdCounter > 0) {
|
if (combat.swingCdCounter > 0) {
|
||||||
combat.swingCdCounter -= deltaTime;
|
combat.swingCdCounter -= deltaTime;
|
||||||
} if (combat.swingCdCounter > 0) { return; }
|
} if (combat.swingCdCounter > 0) { continue; }
|
||||||
|
|
||||||
// Ready to swing !
|
// Ready to swing !
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user