diff --git a/Assets/01_Scenes/_TestScenes/Test1.unity b/Assets/01_Scenes/_TestScenes/Test1.unity index 91e0d9c5..0dbed38b 100644 --- a/Assets/01_Scenes/_TestScenes/Test1.unity +++ b/Assets/01_Scenes/_TestScenes/Test1.unity @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c54a2dd0f4392013000e3c66567d59ee3b6c694594cd10800ca645f754432cf6 -size 22968 +oid sha256:84db3cded69e97a4aff3dc0f3fc3bbbeecc746a62f41df2403c6070d5cd74ac6 +size 37658 diff --git a/Assets/02_Scripts/Managers/GameManager.cs b/Assets/02_Scripts/Managers/GameManager.cs index f76fbb2d..0351a411 100644 --- a/Assets/02_Scripts/Managers/GameManager.cs +++ b/Assets/02_Scripts/Managers/GameManager.cs @@ -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); //이미 인스턴스가 있으면 자신을 파괴 + } + } } diff --git a/Assets/02_Scripts/Managers/SceneLoadManager.cs b/Assets/02_Scripts/Managers/SceneLoadManager.cs index 95719fa9..e0be5210 100644 --- a/Assets/02_Scripts/Managers/SceneLoadManager.cs +++ b/Assets/02_Scripts/Managers/SceneLoadManager.cs @@ -19,7 +19,6 @@ private void Awake() if (Instance == null) { Instance = this; // 만들어진 자신을 인스턴스로 설정 - DontDestroyOnLoad(gameObject); } else { diff --git a/Assets/02_Scripts/Managers/StoryManager.cs b/Assets/02_Scripts/Managers/StoryManager.cs index 96e81b60..5506dd87 100644 --- a/Assets/02_Scripts/Managers/StoryManager.cs +++ b/Assets/02_Scripts/Managers/StoryManager.cs @@ -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; } } diff --git a/Assets/05_Textures/dumy.txt.meta b/Assets/02_Scripts/UI/View.meta similarity index 57% rename from Assets/05_Textures/dumy.txt.meta rename to Assets/02_Scripts/UI/View.meta index 0e9cf4c2..ff420d13 100644 --- a/Assets/05_Textures/dumy.txt.meta +++ b/Assets/02_Scripts/UI/View.meta @@ -1,6 +1,7 @@ fileFormatVersion: 2 -guid: 1402ff461adcbd3419d693e383429d99 -TextScriptImporter: +guid: 0f1a9ff343024774f8862222db2926b1 +folderAsset: yes +DefaultImporter: externalObjects: {} userData: assetBundleName: diff --git a/Assets/02_Scripts/UI/View/AffectionHud.cs b/Assets/02_Scripts/UI/View/AffectionHud.cs new file mode 100644 index 00000000..bfc3e7dc --- /dev/null +++ b/Assets/02_Scripts/UI/View/AffectionHud.cs @@ -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(); + } +} diff --git a/Assets/02_Scripts/UI/View/AffectionHud.cs.meta b/Assets/02_Scripts/UI/View/AffectionHud.cs.meta new file mode 100644 index 00000000..7f2a1210 --- /dev/null +++ b/Assets/02_Scripts/UI/View/AffectionHud.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 40ff35620b18f6444939867b13de4cb9 \ No newline at end of file diff --git a/Assets/04_Models/Characters/Real Dinosaurs/Carnotaurus.prefab b/Assets/04_Models/Characters/Real Dinosaurs/Carnotaurus.prefab index 5bd299d0..f4926166 100644 --- a/Assets/04_Models/Characters/Real Dinosaurs/Carnotaurus.prefab +++ b/Assets/04_Models/Characters/Real Dinosaurs/Carnotaurus.prefab @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:333f3d620b6225cf05caaf5797032b0d3bf9b6331a4eea5e42a381ac11914687 -size 81881 +oid sha256:3747d8a49f26db29c0b76aa05791fa4ef376d8538786502951bb64eb4c8dcc95 +size 93856 diff --git a/Assets/05_Textures/AffectionHeart.png b/Assets/05_Textures/AffectionHeart.png new file mode 100644 index 00000000..1368289d --- /dev/null +++ b/Assets/05_Textures/AffectionHeart.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0c43b893f19b96247153ea89d5c00b5e785fefa85807871561d7ad6c468af2d6 +size 340753 diff --git a/Assets/05_Textures/AffectionHeart.png.meta b/Assets/05_Textures/AffectionHeart.png.meta new file mode 100644 index 00000000..5ebe4171 --- /dev/null +++ b/Assets/05_Textures/AffectionHeart.png.meta @@ -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: diff --git a/Assets/05_Textures/dumy.txt b/Assets/05_Textures/dumy.txt deleted file mode 100644 index ce0b02a8..00000000 --- a/Assets/05_Textures/dumy.txt +++ /dev/null @@ -1 +0,0 @@ -dumy \ No newline at end of file diff --git a/Assets/09_UI/dumy.txt.meta b/Assets/09_UI/Dialog.meta similarity index 57% rename from Assets/09_UI/dumy.txt.meta rename to Assets/09_UI/Dialog.meta index 25d63d7e..a3818702 100644 --- a/Assets/09_UI/dumy.txt.meta +++ b/Assets/09_UI/Dialog.meta @@ -1,6 +1,7 @@ fileFormatVersion: 2 -guid: 317b2a4d789e8d947a254723b29d910d -TextScriptImporter: +guid: d3caf231525a74c439101e9d0ffa8a29 +folderAsset: yes +DefaultImporter: externalObjects: {} userData: assetBundleName: diff --git a/Assets/09_UI/Dialog/WorldDialogCanvas.prefab b/Assets/09_UI/Dialog/WorldDialogCanvas.prefab new file mode 100644 index 00000000..5d5b2d2e --- /dev/null +++ b/Assets/09_UI/Dialog/WorldDialogCanvas.prefab @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:58a081fbe7bc3261bc8b43ef1087a6622a7121d9be2913a9497a4972f1283c27 +size 18354 diff --git a/Assets/12_Font/dumy.txt.meta b/Assets/09_UI/Dialog/WorldDialogCanvas.prefab.meta similarity index 62% rename from Assets/12_Font/dumy.txt.meta rename to Assets/09_UI/Dialog/WorldDialogCanvas.prefab.meta index 22da20ff..eab3b617 100644 --- a/Assets/12_Font/dumy.txt.meta +++ b/Assets/09_UI/Dialog/WorldDialogCanvas.prefab.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 -guid: 0994ca28628a9e14bb96be4ef9ad1957 -TextScriptImporter: +guid: e0fce60d132efce4f8fd2a0167e24ca1 +PrefabImporter: externalObjects: {} userData: assetBundleName: diff --git a/Assets/09_UI/dumy.txt b/Assets/09_UI/dumy.txt deleted file mode 100644 index ce0b02a8..00000000 --- a/Assets/09_UI/dumy.txt +++ /dev/null @@ -1 +0,0 @@ -dumy \ No newline at end of file diff --git a/Assets/12_Font/Limgul24 SDF.asset b/Assets/12_Font/Limgul24 SDF.asset new file mode 100644 index 00000000..8c3f8c1c --- /dev/null +++ b/Assets/12_Font/Limgul24 SDF.asset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ad563af7460f3191807c82e38ec2e31fb323712f12d5f41a6cad9247978d66c2 +size 139774462 diff --git a/Assets/12_Font/Limgul24 SDF.asset.meta b/Assets/12_Font/Limgul24 SDF.asset.meta new file mode 100644 index 00000000..e0a7033f --- /dev/null +++ b/Assets/12_Font/Limgul24 SDF.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 650e066dbee96e64ab4a895731f22368 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/12_Font/Limgul24.ttf b/Assets/12_Font/Limgul24.ttf new file mode 100644 index 00000000..42d1cd6e --- /dev/null +++ b/Assets/12_Font/Limgul24.ttf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:98001a4e8e43409155bafe4e5796c68b8d35b1b0aa5c1589ef3c78315c33deab +size 5078020 diff --git a/Assets/12_Font/Limgul24.ttf.meta b/Assets/12_Font/Limgul24.ttf.meta new file mode 100644 index 00000000..e6551c9d --- /dev/null +++ b/Assets/12_Font/Limgul24.ttf.meta @@ -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: diff --git a/Assets/12_Font/dumy.txt b/Assets/12_Font/dumy.txt deleted file mode 100644 index ce0b02a8..00000000 --- a/Assets/12_Font/dumy.txt +++ /dev/null @@ -1 +0,0 @@ -dumy \ No newline at end of file diff --git a/Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Fallback.asset b/Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Fallback.asset index ddc94fa0..42f8d570 100644 --- a/Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Fallback.asset +++ b/Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Fallback.asset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1ff4ac652c2e66f2de72987ef5b7c49fb532a266591bbf97e932c257497f246f -size 9746 +oid sha256:bde8096b4febd510d2787bef00dbe8c532f421f4824cfa52a754116d9e0ea93d +size 535525 diff --git a/Assets/XR/Settings/OpenXRPackageSettings.asset b/Assets/XR/Settings/OpenXRPackageSettings.asset index e27466dd..697de6f3 100644 --- a/Assets/XR/Settings/OpenXRPackageSettings.asset +++ b/Assets/XR/Settings/OpenXRPackageSettings.asset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8c655eda79c776f464d840715eb3f5346607b0c4bd949049c1d06df19b4af5ae -size 112972 +oid sha256:22f295dbc15d527a00800e8e9708eddaee30b485eea0f739cd29ee7b3724f7bc +size 127603 diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index 8e6931e3..3aa6f916 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:deb9a8cdc4d853580d05ab629d095c983aa66a3ce2eaabf499724d82bdddc011 -size 28133 +oid sha256:2e5521104eaa48f05e396e79619a3bd35f8912b579e27aae4ba3c351ad0f349c +size 28225