2026-07-07 폰트추가,대화 테스트

This commit is contained in:
2026-07-07 14:20:00 +09:00
parent d88f8770cd
commit 85dae3d159
23 changed files with 266 additions and 30 deletions

Binary file not shown.

View File

@@ -3,4 +3,16 @@
public class GameManager : MonoBehaviour
{
public static GameManager Instance { get; private set; }
private void Awake()
{
if (Instance == null)
{
Instance = this; //만들어진 자신을 인스턴스로 설정
}
else
{
Destroy(gameObject); //이미 인스턴스가 있으면 자신을 파괴
}
}
}

View File

@@ -19,7 +19,6 @@ private void Awake()
if (Instance == null)
{
Instance = this; // 만들어진 자신을 인스턴스로 설정
DontDestroyOnLoad(gameObject);
}
else
{

View File

@@ -16,13 +16,14 @@ public class StoryManager : MonoBehaviour
private void Awake()
{
if (Instance != null && Instance != this)
if (Instance == null)
{
Destroy(gameObject);
return;
Instance = this; //만들어진 자신을 인스턴스로 설정
}
else
{
Destroy(gameObject); //이미 인스턴스가 있으면 자신을 파괴
}
Instance = this;
DontDestroyOnLoad(gameObject);
}
// ── 메인 진행도 ──────────────────────────────────────────────
@@ -80,21 +81,31 @@ public void RecordChoice(string code)
public void Save() => File.WriteAllText(SavePath, _state.ToJson());
// 저장 파일이 있으면 불러온다. 성공 여부 반환.
public bool Load()
public void Load()
{
if (!File.Exists(SavePath)) return false;
if (!File.Exists(SavePath))
{
Debug.LogWarning("세이브 파일이 없습니다.");
return;
}
try
{
var loaded = StoryState.FromJson(File.ReadAllText(SavePath));
if (loaded == null) return false;
if (loaded == null)
{
Debug.LogWarning("세이브 파일이 잘못되었습니다.");
return;
}
_state = loaded;
Changed?.Invoke();
return true;
return;
}
catch (Exception e)
{
Debug.LogWarning($"[StoryManager] 저장 파일 로드 실패: {e.Message}");
return false;
return;
}
}

View File

@@ -1,6 +1,7 @@
fileFormatVersion: 2
guid: 1402ff461adcbd3419d693e383429d99
TextScriptImporter:
guid: 0f1a9ff343024774f8862222db2926b1
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:

View File

@@ -0,0 +1,16 @@
using TMPro;
using UnityEngine;
public class AffectionHud : MonoBehaviour
{
[SerializeField] private CharacterData _characterData;
[Header("Refs")]
[SerializeField] private GameObject _root;
[SerializeField] private TMP_Text _attectionText;
public void RefreshUI()
{
_attectionText.text = StoryManager.Instance.GetAffection(_characterData).ToString();
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 40ff35620b18f6444939867b13de4cb9

Binary file not shown.

View File

@@ -0,0 +1,156 @@
fileFormatVersion: 2
guid: dcc10b47a1dac0b4cab83d52ce2f07d8
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: WebGL
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: WindowsStoreApps
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
customData:
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1 +0,0 @@
dumy

View File

@@ -1,6 +1,7 @@
fileFormatVersion: 2
guid: 317b2a4d789e8d947a254723b29d910d
TextScriptImporter:
guid: d3caf231525a74c439101e9d0ffa8a29
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:

Binary file not shown.

View File

@@ -1,6 +1,6 @@
fileFormatVersion: 2
guid: 0994ca28628a9e14bb96be4ef9ad1957
TextScriptImporter:
guid: e0fce60d132efce4f8fd2a0167e24ca1
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:

View File

@@ -1 +0,0 @@
dumy

BIN
Assets/12_Font/Limgul24 SDF.asset LFS Normal file

Binary file not shown.

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 650e066dbee96e64ab4a895731f22368
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

BIN
Assets/12_Font/Limgul24.ttf LFS Normal file

Binary file not shown.

View File

@@ -0,0 +1,21 @@
fileFormatVersion: 2
guid: ea6b149d098afa843ac77868b75859ea
TrueTypeFontImporter:
externalObjects: {}
serializedVersion: 4
fontSize: 16
forceTextureCase: -2
characterSpacing: 0
characterPadding: 1
includeFontData: 1
fontNames:
- Limgul 24
fallbackFontReferences: []
customCharacters:
fontRenderingMode: 0
ascentCalculationMode: 1
useLegacyBoundsCalculation: 0
shouldRoundAdvanceValue: 1
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1 +0,0 @@
dumy

Binary file not shown.