2026-07-08 이벤트존 추가

This commit is contained in:
2026-07-08 18:15:44 +09:00
parent f00da071ff
commit 27a0dfcd44
11 changed files with 1177 additions and 5 deletions

View File

@@ -10,6 +10,7 @@ public class StoryState
public readonly Dictionary<string, int> Affection = new(); // 캐릭터 Id → 호감도
public readonly HashSet<string> CompletedDialogs = new(); // 완료한 DialogGroup 이름
public readonly HashSet<string> ChosenCodes = new(); // 골랐던 선택지 Code
public readonly HashSet<string> TriggeredZones = new(); // 밟았던 EventZone Id
public void Clear()
{
@@ -17,6 +18,7 @@ public void Clear()
Affection.Clear();
CompletedDialogs.Clear();
ChosenCodes.Clear();
TriggeredZones.Clear();
}
// ── JSON 변환 ────────────────────────────────────────────────
@@ -29,6 +31,7 @@ private class JsonData
public List<int> AffectionValues = new();
public List<string> CompletedDialogs = new();
public List<string> ChosenCodes = new();
public List<string> TriggeredZones = new();
}
public string ToJson()
@@ -41,6 +44,7 @@ public string ToJson()
}
data.CompletedDialogs.AddRange(CompletedDialogs);
data.ChosenCodes.AddRange(ChosenCodes);
data.TriggeredZones.AddRange(TriggeredZones);
return JsonUtility.ToJson(data, prettyPrint: true);
}
@@ -55,6 +59,7 @@ public static StoryState FromJson(string json)
state.Affection[data.AffectionIds[i]] = data.AffectionValues[i];
state.CompletedDialogs.UnionWith(data.CompletedDialogs);
state.ChosenCodes.UnionWith(data.ChosenCodes);
state.TriggeredZones.UnionWith(data.TriggeredZones);
return state;
}
}