feat: 게임 인트로 씬 추가 작업
This commit is contained in:
14
Gameton-06/Assets/Gameton/Scripts/GameData/IntroStoryData.cs
Normal file
14
Gameton-06/Assets/Gameton/Scripts/GameData/IntroStoryData.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace TON
|
||||
{
|
||||
[System.Serializable]
|
||||
public class IntroStoryData
|
||||
{
|
||||
public int background;
|
||||
public string speaker;
|
||||
public string content;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fc694114c5406d447ab40f0d7c02db2b
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Gameton-06/Assets/Gameton/Scripts/IntroStory.meta
Normal file
8
Gameton-06/Assets/Gameton/Scripts/IntroStory.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fb07b60479abc92488d5aa4e83f215c7
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,26 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace TON
|
||||
{
|
||||
public class IntroStoryDataManager : MonoBehaviour
|
||||
{
|
||||
public List<IntroStoryData> introStories { get; private set; }
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
LoadIntroStoryData();
|
||||
}
|
||||
|
||||
private void LoadIntroStoryData()
|
||||
{
|
||||
introStories = JSONLoader.LoadFromResources<List<IntroStoryData>>("intro_story");
|
||||
if (introStories == null)
|
||||
{
|
||||
introStories = new List<IntroStoryData>();
|
||||
Debug.LogError("스토리 데이터 로드 실패");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 17c8388c9ee8b344a9d9064f6df90982
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
20
Gameton-06/Assets/Gameton/Scripts/UI/IntroUI.cs
Normal file
20
Gameton-06/Assets/Gameton/Scripts/UI/IntroUI.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace TON
|
||||
{
|
||||
public class IntroUI : UIBase
|
||||
{
|
||||
public List<IntroStoryData> introStories = new List<IntroStoryData>();
|
||||
|
||||
private IntroStoryDataManager introStoryDataManager;
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
introStoryDataManager = new IntroStoryDataManager();
|
||||
|
||||
introStories = introStoryDataManager.introStories;
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Gameton-06/Assets/Gameton/Scripts/UI/IntroUI.cs.meta
Normal file
11
Gameton-06/Assets/Gameton/Scripts/UI/IntroUI.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8550ef0700c66e64fabb97f3468ced13
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user