public void hitShields(Projectile projectile) { ShieldSystem shields = (ShieldSystem) systems.get("shields"); if (shields.getShieldLvl() > 0) { shields.hitShields(projectile); } else { System.out.println("no shields to protect from projectile"); } }
public int getShieldLvl() { ShieldSystem shields = (ShieldSystem) systems.get("shields"); if (shields != null) { return shields.getShieldLvl(); } return 0; }