added session loss sequence, added energy and stamina to HUD, added home location trigger
This commit is contained in:
@@ -48,6 +48,11 @@ public:
|
||||
UPROPERTY(BlueprintAssignable, Category = "Session")
|
||||
FOnSessionLossResolvedSignature OnSessionLossResolved;
|
||||
|
||||
// Teleport the player pawn to the home APlayerStart (preferring one tagged "Home").
|
||||
// Called automatically when a loss cutscene finishes; exposed for debug / direct use.
|
||||
UFUNCTION(BlueprintCallable, Category = "Session")
|
||||
void TeleportPlayerHome();
|
||||
|
||||
private:
|
||||
// EnergyZero / sleep: every clothing item left outside the apartment is guaranteed lost.
|
||||
void LoseAllWorldClothing();
|
||||
@@ -55,9 +60,28 @@ private:
|
||||
// §7.7: cleared on police capture. No-op until the Wanted attribute exists (Phase 6).
|
||||
void ClearWanted();
|
||||
|
||||
// Plays the configured cutscene for the resolved cause, then teleports the player home
|
||||
// on finish. No cutscene authored → teleports immediately. SafeReturn → no presentation.
|
||||
void BeginLossPresentation(ESessionLossCause Cause);
|
||||
|
||||
UFUNCTION()
|
||||
void HandleLossCutsceneFinished();
|
||||
|
||||
void Autosave() const;
|
||||
class UGlobalSaveGameData* GetSave() const;
|
||||
class ULossPresentationConfig* GetPresentationConfig() const;
|
||||
|
||||
// §21 tuning placeholder — the police-capture money penalty.
|
||||
float PoliceCaptureMoneyPenalty = 200.0f;
|
||||
|
||||
// PlayerStart tag of the home spawn, preferred over an untagged start (GDD §4.4).
|
||||
static const FName HomePlayerStartTag;
|
||||
|
||||
// The level-sequence player/actor for the in-flight loss cutscene. Held so they survive
|
||||
// GC until OnFinished fires; torn down in HandleLossCutsceneFinished.
|
||||
UPROPERTY()
|
||||
TObjectPtr<class ULevelSequencePlayer> ActiveLossSequencePlayer;
|
||||
|
||||
UPROPERTY()
|
||||
TObjectPtr<class ALevelSequenceActor> ActiveLossSequenceActor;
|
||||
};
|
||||
Reference in New Issue
Block a user