43 lines
1.3 KiB
C++
43 lines
1.3 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "Characters/PHYCharacterBase.h"
|
|
#include "PHYAICharacter.generated.h"
|
|
|
|
class UGGA_AbilitySystemComponent;
|
|
|
|
/**
|
|
* @brief PHY AI 角色。
|
|
*
|
|
* AI ASC 创建在 AI Character 自身,不创建玩家相机,也不绑定玩家输入。
|
|
*/
|
|
UCLASS(BlueprintType, Blueprintable)
|
|
class PHY_API APHYAICharacter : public APHYCharacterBase
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
/** @brief 构造 AI 角色自有 ASC。 */
|
|
APHYAICharacter(const FObjectInitializer& ObjectInitializer = FObjectInitializer::Get());
|
|
|
|
/** @brief 开始游戏时初始化 AI 自身 ASC。 */
|
|
virtual void BeginPlay() override;
|
|
|
|
/** @brief AI 被控制器接管时初始化自身 ASC。 */
|
|
virtual void PossessedBy(AController* NewController) override;
|
|
|
|
/** @brief 获取 AI 自有 GGA ASC。 */
|
|
UFUNCTION(BlueprintCallable, BlueprintPure, Category="PHY|AI")
|
|
UGGA_AbilitySystemComponent* GetAIAbilitySystemComponent() const { return AbilitySystemComponent; }
|
|
|
|
protected:
|
|
/** @brief 初始化 AI 自身作为 Owner 和 Avatar 的 ASC。 */
|
|
virtual void InitializeAIAbilitySystem();
|
|
|
|
/** @brief AI 自身 ASC。 */
|
|
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="PHY|AI")
|
|
TObjectPtr<UGGA_AbilitySystemComponent> AbilitySystemComponent;
|
|
};
|