第一次提交

This commit is contained in:
不明不惑
2026-03-03 01:23:02 +08:00
commit 3e434877e8
1053 changed files with 102411 additions and 0 deletions

View File

@@ -0,0 +1,51 @@
// Copyright 2025 https://yuewu.dev/en All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "GCS_BulletStructLibrary.h"
#include "Components/ActorComponent.h"
#include "GCS_BulletSystemComponent.generated.h"
/**
* @note WIP
*/
UCLASS(Abstract, ClassGroup=(GCS), meta=(BlueprintSpawnableComponent))
class GENERICCOMBATSYSTEM_API UGCS_BulletSystemComponent : public UActorComponent
{
GENERATED_BODY()
public:
// Sets default values for this component's properties
UGCS_BulletSystemComponent();
protected:
// Called when the game starts
virtual void BeginPlay() override;
public:
/**
* Gets the bullet system component from an actor.
* 从Actor获取子弹系统组件。
* @param Actor The actor to query. 要查询的Actor。
* @return The bullet system component. 子弹系统组件。
*/
UFUNCTION(BlueprintCallable, BlueprintPure, Category = "GCS|BulletSystem", Meta = (DefaultToSelf="Actor"))
static UGCS_BulletSystemComponent* GetBulletSystemComponent(const AActor* Actor);
/**
* Finds the bullet system component on an actor.
* 在Actor上查找子弹系统组件。
* @param Actor The actor to query. 要查询的Actor。
* @param Component The found component (output). 找到的组件(输出)。
* @return True if found. 如果找到返回true。
*/
UFUNCTION(BlueprintCallable, Category = "GCS|BulletSystem", Meta = (DefaultToSelf="Actor", ExpandBoolAsExecs="ReturnValue"))
static bool FindBulletSystemComponent(const AActor* Actor, UGCS_BulletSystemComponent*& Component);
UFUNCTION(BlueprintCallable, BlueprintPure, Category = "GCS|BulletSystem")
void SpawnBullet(const FGCS_BulletSpawnParameters& SpawnParameters);
// virtual TArray<AGCS_BulletInstance*> SpawnBulletInternal(const FGCS_BulletSpawnParameters& SpawnParameters);
};