유나 엔딩

This commit is contained in:
2026-07-24 13:21:49 +09:00
parent ad15f47c75
commit c2a10b4bf3
10 changed files with 4419 additions and 5 deletions

View File

@@ -1,4 +1,5 @@
using System;
using System.Collections.Generic;
using System.IO;
using UnityEngine;
@@ -13,6 +14,17 @@ public class StoryManager : MonoBehaviour
"이 매니저가 살아남는 씬(플레이를 시작한 씬)의 값만 적용되고, 씬 전환으로 넘어온 경우엔 무시된다")]
[Min(0)] [SerializeField] private int _initialMainProgress;
[Serializable]
private struct InitialAffection
{
public CharacterData Character;
public int Amount;
}
[Tooltip("플레이 시작 시 호감도 초기값 — 이 씬만 직접 열어 테스트할 때 앞 과정 없이 원하는 호감도로 시작하게. " +
"진행도 초기값과 마찬가지로 플레이를 시작한 씬의 값만 적용되고, 씬 전환으로 넘어온 경우엔 무시된다")]
[SerializeField] private List<InitialAffection> _initialAffections = new();
private StoryState _state = new();
// 상태가 바뀔 때마다 발행 (호감도 게이지 등 UI 갱신용)
@@ -24,6 +36,11 @@ private void Awake()
{
Instance = this; //만들어진 자신을 인스턴스로 설정
_state.MainProgress = _initialMainProgress; // 테스트용 초기 진행도 (씬 전환으로 넘어온 중복은 여기 못 옴)
// 테스트용 초기 호감도 (첫 인스턴스에서만 — 씬 전환으로 넘어온 경우엔 이 자리에 못 옴)
foreach (var init in _initialAffections)
if (init.Character != null)
_state.Affection[IdOf(init.Character)] = init.Amount;
}
else
{