Files
Naked-Desire/Source/NakedDesire/NPC/NPC.h
T
2026-06-03 15:17:02 +03:00

52 lines
1.7 KiB
C++

// © 2025 Naked People Team. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/Character.h"
#include "NPCType.h"
#include "NPC.generated.h"
class UNPCTypeDefinition;
UCLASS()
class NAKEDDESIRE_API ANPC : public ACharacter
{
GENERATED_BODY()
public:
ANPC();
// Behavioral template for this NPC (Walker / Stalker / …). Author one DA_* per type and assign
// here (or on the NPC blueprint). Null falls back to Walker-ish defaults (GDD §10.2, §17.4).
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "NPC")
TObjectPtr<UNPCTypeDefinition> NPCTypeDefinition;
UFUNCTION(BlueprintPure, Category = "NPC")
ENPCType GetNPCType() const;
// Multiplier on this NPC's embarrassment contribution; read by StatsManager via the AI controller.
UFUNCTION(BlueprintPure, Category = "NPC")
float GetObservationWeight() const;
// True for Stalker-like types; the behavior tree branches on this to stop and stare vs. walk past.
UFUNCTION(BlueprintPure, Category = "NPC")
bool ShouldStopToObserve() const;
// Seconds a stopping NPC lingers staring before resuming its path.
UFUNCTION(BlueprintPure, Category = "NPC")
float GetObserveDuration() const;
// Pooling lifecycle driven by UNPCDirectorSubsystem. The native side handles transform /
// visibility / collision / movement; the BlueprintImplementableEvents let the behavior-tree
// layer restart and pick a fresh destination (BT startup lives in BP, §17.5).
void ActivateFromPool(const FVector& Location, const FRotator& Rotation);
void DeactivateToPool();
protected:
UFUNCTION(BlueprintImplementableEvent, Category = "NPC")
void OnActivatedFromPool();
UFUNCTION(BlueprintImplementableEvent, Category = "NPC")
void OnDeactivatedToPool();
};