Initial commit

This commit is contained in:
zhongwei
2025-11-29 09:37:28 +08:00
commit 826b04b3e4
8 changed files with 291 additions and 0 deletions

View File

@@ -0,0 +1,46 @@
---
name: UE Gameplay框架
description: Actor、Pawn、GameMode核心类
version: 1.0.0
---
# Unreal Engine Gameplay Framework
## Core Classes
- **AActor**: Base class for placeable objects
- **APawn**: Actors that can be possessed
- **ACharacter**: Humanoid pawns with movement
- **APlayerController**: Player input and control
- **AGameMode**: Game rules and logic
## Component Pattern
```cpp
UCLASS()
class AMyCharacter : public ACharacter {
GENERATED_BODY()
UPROPERTY(VisibleAnywhere)
UStaticMeshComponent* MeshComp;
UPROPERTY(VisibleAnywhere)
UBoxComponent* TriggerBox;
public:
AMyCharacter() {
MeshComp = CreateDefaultSubobject<UStaticMeshComponent>("Mesh");
TriggerBox = CreateDefaultSubobject<UBoxComponent>("Trigger");
}
};
```
## Gameplay Ability System
- Attributes and AttributeSets
- GameplayEffects for buffs/debuffs
- GameplayAbilities for skills
- GameplayTasks for async operations
## Best Practices
- Use Blueprintable C++ classes
- Leverage UProperty for reflection
- Minimize Tick usage
- Use Object Pooling for frequently spawned actors