Added NPC logic

This commit is contained in:
2026-06-01 22:04:31 +03:00
parent 89c2e93369
commit 0e9832719d
37 changed files with 156 additions and 41 deletions
@@ -0,0 +1,29 @@
// © 2025 Naked People Team. All Rights Reserved.
#include "NPCTargetLocation.h"
#include "NPC.h"
ANPCTargetLocation::ANPCTargetLocation()
{
PrimaryActorTick.bCanEverTick = false;
}
bool ANPCTargetLocation::TryClaim(ANPC* InClaimant)
{
if (Claimant.IsValid() && Claimant.Get() != InClaimant)
return false;
Claimant = InClaimant;
return true;
}
void ANPCTargetLocation::Release(ANPC* Requester)
{
if (!Claimant.IsValid() || Claimant.Get() != Requester)
return;
Claimant = nullptr;
}