// Marche du personnage et invites de proximite. // // LeftRight et DownUp restent la vue de dessus (BPs/PC : LeftRightBirdView, DownUpBirdview). // La marche lit deux axes neufs, MoveForward et MoveRight. Elle ne tourne pas quand un menu // a le clavier (reglages, journal, panneau Clavier, saisie de texte). // // Les invites viennent des textes des modules : WHERE contenant interaction, et les fichiers // .lpnear (MESH, PROMPT, ACTION). La liste est tenue ici, sur la personne ou le maillage le // plus proche, et elle reste cachee. E l'affiche ; un second E, ou un clic, lance l'action. // Le personnage n'est pas possede : la marche active bRunPhysicsWithNoController. // La marche du jeu ne joue un cycle que si LPAnimTarget.ini vaut game (clips B_ / M_). // sandbox laisse le corps au Blueprint. La camera suiveuse n'est pas branchee. // Aucun Blueprint n'est modifie. #pragma once #include "CoreMinimal.h" #include "Animation/AnimationAsset.h" #include "Camera/CameraActor.h" #include "Containers/Ticker.h" #include "Subsystems/GameInstanceSubsystem.h" #include "LPDirectControlSubsystem.generated.h" class AActor; UCLASS() class LIFEPLAY_API ULPDirectControlSubsystem : public UGameInstanceSubsystem { GENERATED_BODY() public: virtual void Initialize(FSubsystemCollectionBase& Collection) override; virtual void Deinitialize() override; void ActivatePrompt(int32 Index); void HighlightPrompt(int32 Index); private: bool Tick(float DeltaTime); void RefreshIndex(); void RefreshTarget(); void Walk(float DeltaTime); void FollowCamera(APawn* Pawn, APlayerController* PC, float DeltaTime, bool bMoving); void WalkAnim(ACharacter* Character, float Speed); void RestoreAnim(); void PollInteract(); void ShowPrompts(); void HidePrompts(); FTSTicker::FDelegateHandle TickHandle; float MenuDelay = 0.f; float IndexDelay = 0.f; float TargetDelay = 0.f; bool bMenuBlocks = false; FString LastEnabled; bool bIndexed = false; FString ShownSignature; int32 Selected = 0; bool bPromptOpen = false; TWeakObjectPtr CurrentTarget; bool bCurrentIsPerson = false; UPROPERTY() TObjectPtr FollowView; UPROPERTY() TObjectPtr BirdView; UPROPERTY() TObjectPtr SavedAnimClass; UPROPERTY() TObjectPtr SavedSingleAnim; uint8 SavedAnimMode = 0; bool bAnimCaptured = false; };