Files
PHY/Plugins/GCS/Source/GenericCombatSystem/Public/Bullet/GCS_SphereBulletInstance.h
2026-03-03 01:23:02 +08:00

55 lines
1.3 KiB
C++

// Copyright 2025 https://yuewu.dev/en All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "GCS_BulletInstance.h"
#include "GCS_SphereBulletInstance.generated.h"
class USphereComponent;
/**
* Bullet instance with a spherical collision shape.
* 具有球形碰撞形状的子弹实例。
*/
UCLASS(Abstract, Blueprintable)
class GENERICCOMBATSYSTEM_API AGCS_SphereBulletInstance : public AGCS_BulletInstance
{
GENERATED_BODY()
public:
/**
* Default constructor.
* 默认构造函数。
*/
AGCS_SphereBulletInstance();
/**
* Gets the bullet's shape component.
* 获取子弹的形状组件。
* @return The sphere component. 球形组件。
*/
virtual UShapeComponent* GetBulletShape_Implementation() const override;
protected:
/**
* Called when the game starts or when spawned.
* 游戏开始或生成时调用。
*/
virtual void BeginPlay() override;
/**
* The sphere component for collision detection.
* 用于碰撞检测的球形组件。
*/
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="GCS")
TObjectPtr<USphereComponent> Sphere;
public:
/**
* Called every frame.
* 每帧调用。
* @param DeltaTime Time since last frame. 上一帧以来的时间。
*/
virtual void Tick(float DeltaTime) override;
};