Payback 0.0.1
CK Graduation Project
로딩중...
검색중...
일치하는것 없음
LevelRuleData.h
이 파일의 문서화 페이지로 가기
1// Fill out your copyright notice in the Description page of Project Settings.
2
3#pragma once
4
5#include "CoreMinimal.h"
6#include "Engine/DataAsset.h"
7#include "LevelRuleData.generated.h"
8
10
11
12UENUM(BlueprintType)
13enum class ELevelWinCondition : uint8
14{
15 TimeSurvival UMETA(DisplayName = "시간 생존"),
16 EliminateAllWaves UMETA(DisplayName = "전 웨이브 섬멸"),
17 BossKill UMETA(DisplayName = "보스 처치"),
18};
19
20
21USTRUCT(BlueprintType)
23{
24 GENERATED_BODY()
25
26 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Spawn")
27 TSoftClassPtr<ACK_CharacterEnemy> MonsterClass;
28
29 // 이 웨이브에서 스폰할 총 수
30 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Spawn", meta = (ClampMin = "1"))
31 int32 SpawnCount = 1;
32
33 // 한 마리씩 스폰될 때의 간격 (초)
34 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Spawn", meta = (ClampMin = "0.0"))
35 float SpawnInterval = 1.0f;
36};
37
38
39USTRUCT(BlueprintType)
41{
42 GENERATED_BODY()
43
44 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Wave")
45 TArray<FMonsterSpawnEntry> MonsterEntries;
46
47 // 이 웨이브의 동시 생존 몬스터 상한 (0 = 전역 설정 따름)
48 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Wave", meta = (ClampMin = "0"))
49 int32 MaxAliveMonsters = 0;
50
51 // 이전 웨이브 종료 후 대기 시간 (초)
52 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Wave", meta = (ClampMin = "0.0"))
53 float WaveStartDelay = 3.0f;
54
55 // true = 몬스터 전멸 후 다음 웨이브 / false = 타이머로 다음 웨이브
56 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Wave")
57 bool bWaitForClear = true;
58};
59
60
61UCLASS()
62class CK_UE_API ULevelRuleData : public UPrimaryDataAsset
63{
64 GENERATED_BODY()
65
66public:
67 // === 승리 조건 ===
68 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Rules")
69 ELevelWinCondition WinCondition = ELevelWinCondition::EliminateAllWaves;
70
71 // TimeSurvival 선택 시 생존 목표 시간 (초)
72 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Rules", meta = (ClampMin = "0.0", EditCondition = "WinCondition == ELevelWinCondition::TimeSurvival", EditConditionHides))
73 float SurvivalTime = 60.0f;
74
75 // === 웨이브 ===
76 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Waves")
77 TArray<FWaveData> Waves;
78
79 // 레벨 전체 동시 생존 몬스터 수 상한 — PoolWorldSubsystem 예열 기준으로도 활용
80 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Waves", meta = (ClampMin = "1"))
81 int32 GlobalMaxAliveMonsters = 50;
82
83};
ELevelWinCondition
Definition LevelRuleData.h:14
Definition CK_CharacterEnemy.h:20
Definition LevelRuleData.h:63
Definition LevelRuleData.h:23
Definition LevelRuleData.h:41