API
바깥에 보이는 클래스와 멤버 정리.
게임 쪽은 보통 DirectorBrain 을 상속해 동작 목록만 바꾸고, 세 개의 Tick 을 자기 루프에서 부릅니다.
| 멤버 | 시그니처 | 설명 |
|---|
ActiveEvents | IReadOnlyList<ReactionEvent> | 지금 벌어지는 일 목록 |
BurningCells | int | 지금 불타는 칸 수 |
ApplyElement | (Vector3 pos, float radius, ElementTag e, float power) | 한 영역에 요소 끼얹기 |
SetWind | (Vector2 dir, float strength) | 바람 설정 |
Fill / SetCell | (string material) / (int x, int y, string material) | 격자 깔기 |
GetCell | (int x, int y) → ElementalState | 칸 상태 읽기 |
Tick | (float dt) | 번짐 + 목록 갱신 |
ElementalState (struct) — MaterialId, Temperature, Wetness, Charge, OnFire, Frozen
ReactionEvent (struct) — Position, Magnitude, Ttl, Kind
MaterialDef — Name, Flammability, Conductivity, IgnitionPoint, FreezePoint, WaterAbsorption
ReactionRule — Trigger, TargetMaterials(;), Effect, Probability, Threshold, TargetMaterialList, MatchesMaterial, 정적 Split
enum ElementTag — None, Fire, Water, Ice, Electric, Wind
enum StateEffect — Ignite, Extinguish, Wet, Dry, Freeze, Thaw, Charge, Discharge
| 멤버 | 시그니처 | 설명 |
|---|
CurrentPhase | Phase | 지금 국면 |
Tick | (WorldReaction, TensionModel, Vector3 playerPos, float dt) | 국면 정하고 조건 깖 |
ActionPool | virtual IReadOnlyList<SeedAction> | 동작 목록 (오버라이드) |
PickActions | virtual IEnumerable<SeedAction> | 동작 고르기 정책 (오버라이드) |
MaxActiveEvents | virtual int | 동시 이벤트 상한 |
DefaultDirectorBrain — 오버라이드 없이 쓰는 기본 구현.
SeedAction (abstract) — Cost, Intent, CanSeed, Seed.
- 기본 동작:
DryUpwind, IgniteUpwind, ChargeStorm, SummonRain.
enum SeedIntent — Prepare, Trigger, Calm.
enum Phase — BuildUp, Peak, Relax.
PhaseFsm — Evaluate(float tension, float dt) → Phase, Current, Reset().
| 멤버 | 시그니처 | 설명 |
|---|
Current | float | 디렉터가 읽는 긴장도 0~1 |
PlayerStress | float | 플레이어 스트레스 0~1 |
OnPlayerDamaged | (float dmg, float maxHp) | 피격 즉발 상승 |
Tick | (Vector3 playerPos, WorldReaction, float dt) | 긴장도 갱신 |
SampleThreat | protected virtual (Vector3) → float | 위협 신호 (갈아끼움) |
SampleAround | protected virtual (Vector3, WorldReaction) → float | 주변 신호 (갈아끼움) |
DataService<T> — GetDataCenter(), Register(T), Reset().
TensionConfig — 세기·반경·가중치·속도·기준값.
PhaseData — PeakEnter/RelaxEnter/BuildUpEnter/MinRelax, 국면별 예산, BudgetFor(Phase).
ActionData — Actions, Add(SeedAction).
RuleData — Materials, Rules, ResolveMaterialId, GetMaterial, AddMaterial, AddRule, 번짐 기준값.
RuleValidator — Validate(RuleData) → List<Issue>, 메뉴 Tools/Tempo/Validate Rules, 빌드 전 자동 검사.
DebugWindow — Bind(TensionModel, DirectorBrain, WorldReaction), 메뉴 Tools/Tempo/Debug Window.