feat(gameplay): implement hook sabotage, generator kick, jump listener, and boss bar UI
- Add HookSabotage system for survivors to disable hooks temporarily - Add GeneratorKick killer ability to regress generator progress - Add PlayerJumpListener to track survivor jump actions - Add BossBarManager for displaying game state and objectives - Update generator regression logic to support killer kick mechanic - Update KillerController to integrate generator kick ability - Update PlayerInteractListener to handle new interaction types - Refactor game phases to use BossBarManager for UI updates - Update .gitignore to exclude compiled bin/ directory - Simplify PLAN.md documentation for easier maintenance
This commit is contained in:
parent
3d6204cc83
commit
89dc9eb00d
78 changed files with 2293 additions and 1210 deletions
|
|
@ -8,6 +8,7 @@ public class ExitGate {
|
|||
private final Location location;
|
||||
private GateState state;
|
||||
private double progress;
|
||||
private double savedProgress; // сохраняется при уходе игрока
|
||||
private boolean powered;
|
||||
|
||||
public enum GateState {
|
||||
|
|
@ -20,6 +21,7 @@ public class ExitGate {
|
|||
this.location = location;
|
||||
this.state = GateState.CLOSED;
|
||||
this.progress = 0.0;
|
||||
this.savedProgress = 0.0;
|
||||
this.powered = false;
|
||||
}
|
||||
|
||||
|
|
@ -72,7 +74,8 @@ public class ExitGate {
|
|||
public void updateProgress(double delta) {
|
||||
if (state != GateState.OPENING) return;
|
||||
|
||||
progress += delta;
|
||||
// Линейная установка — delta это абсолютный шаг, не additive accumulation
|
||||
progress = Math.min(1.0, progress + delta);
|
||||
if (progress >= 1.0) {
|
||||
progress = 1.0;
|
||||
state = GateState.OPEN;
|
||||
|
|
@ -80,9 +83,29 @@ public class ExitGate {
|
|||
}
|
||||
}
|
||||
|
||||
/** Прямая установка прогресса (для линейного расчёта в GateOpening). */
|
||||
public void setProgressDirect(double value) {
|
||||
if (state != GateState.OPENING) return;
|
||||
progress = Math.min(1.0, Math.max(0.0, value));
|
||||
if (progress >= 1.0) {
|
||||
progress = 1.0;
|
||||
state = GateState.OPEN;
|
||||
playOpenedSound();
|
||||
}
|
||||
}
|
||||
|
||||
public double getSavedProgress() { return savedProgress; }
|
||||
|
||||
/** Сохранить текущий прогресс (вызывается когда игрок уходит от ворот) */
|
||||
public void saveProgress() { savedProgress = progress; }
|
||||
|
||||
/** Восстановить сохранённый прогресс (вызывается когда игрок подходит снова) */
|
||||
public void restoreProgress() { progress = savedProgress; }
|
||||
|
||||
public void reset() {
|
||||
this.state = GateState.CLOSED;
|
||||
this.progress = 0.0;
|
||||
this.savedProgress = 0.0;
|
||||
this.powered = false;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue