feat: 게임 인트로 화면 추가
This commit is contained in:
Binary file not shown.
@@ -381,6 +381,7 @@ RectTransform:
|
|||||||
m_LocalScale: {x: 0, y: 0, z: 0}
|
m_LocalScale: {x: 0, y: 0, z: 0}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children:
|
m_Children:
|
||||||
|
- {fileID: 1838560601792412820}
|
||||||
- {fileID: 1284662031430669302}
|
- {fileID: 1284662031430669302}
|
||||||
- {fileID: 1655660795233311557}
|
- {fileID: 1655660795233311557}
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
@@ -1451,6 +1452,81 @@ MonoBehaviour:
|
|||||||
m_hasFontAssetChanged: 0
|
m_hasFontAssetChanged: 0
|
||||||
m_baseMaterial: {fileID: 0}
|
m_baseMaterial: {fileID: 0}
|
||||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
--- !u!1 &5053736552178335022
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 1838560601792412820}
|
||||||
|
- component: {fileID: 1945002513750901063}
|
||||||
|
- component: {fileID: 2977212974098079503}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: Background
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &1838560601792412820
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 5053736552178335022}
|
||||||
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 3104050453120761193}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
|
m_AnchorMax: {x: 1, y: 1}
|
||||||
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
|
m_SizeDelta: {x: 400, y: 200}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!222 &1945002513750901063
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 5053736552178335022}
|
||||||
|
m_CullTransparentMesh: 1
|
||||||
|
--- !u!114 &2977212974098079503
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 5053736552178335022}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_Color: {r: 0, g: 0, b: 0, a: 1}
|
||||||
|
m_RaycastTarget: 1
|
||||||
|
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
m_Maskable: 1
|
||||||
|
m_OnCullStateChanged:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_Sprite: {fileID: 0}
|
||||||
|
m_Type: 0
|
||||||
|
m_PreserveAspect: 0
|
||||||
|
m_FillCenter: 1
|
||||||
|
m_FillMethod: 4
|
||||||
|
m_FillAmount: 1
|
||||||
|
m_FillClockwise: 1
|
||||||
|
m_FillOrigin: 0
|
||||||
|
m_UseSpriteMesh: 0
|
||||||
|
m_PixelsPerUnitMultiplier: 1
|
||||||
--- !u!1 &5577918587925631607
|
--- !u!1 &5577918587925631607
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|||||||
1319
Gameton-06/Assets/Gameton/Resources/UI/Prefabs/UI.IntroUI.prefab
Normal file
1319
Gameton-06/Assets/Gameton/Resources/UI/Prefabs/UI.IntroUI.prefab
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 1ae9d25710a08564cbfd1f709ff7dd43
|
||||||
|
PrefabImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -62,7 +62,7 @@ Canvas:
|
|||||||
m_AdditionalShaderChannelsFlag: 0
|
m_AdditionalShaderChannelsFlag: 0
|
||||||
m_UpdateRectTransformForStandalone: 0
|
m_UpdateRectTransformForStandalone: 0
|
||||||
m_SortingLayerID: 0
|
m_SortingLayerID: 0
|
||||||
m_SortingOrder: 0
|
m_SortingOrder: 99
|
||||||
m_TargetDisplay: 0
|
m_TargetDisplay: 0
|
||||||
--- !u!114 &7615829985678766050
|
--- !u!114 &7615829985678766050
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
|
|||||||
@@ -2504,6 +2504,7 @@ RectTransform:
|
|||||||
m_LocalScale: {x: 0, y: 0, z: 0}
|
m_LocalScale: {x: 0, y: 0, z: 0}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children:
|
m_Children:
|
||||||
|
- {fileID: 6157879791654227180}
|
||||||
- {fileID: 4760497490744360200}
|
- {fileID: 4760497490744360200}
|
||||||
- {fileID: 4746103566376610781}
|
- {fileID: 4746103566376610781}
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
@@ -4999,6 +5000,81 @@ RectTransform:
|
|||||||
m_AnchoredPosition: {x: 0, y: 0}
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
m_SizeDelta: {x: 330, y: 70}
|
m_SizeDelta: {x: 330, y: 70}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!1 &6601776070095025115
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 6157879791654227180}
|
||||||
|
- component: {fileID: 5002933712433328169}
|
||||||
|
- component: {fileID: 1196629119661638923}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: Background
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &6157879791654227180
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 6601776070095025115}
|
||||||
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 8757641668296036231}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
|
m_AnchorMax: {x: 1, y: 1}
|
||||||
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
|
m_SizeDelta: {x: 400, y: 200}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!222 &5002933712433328169
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 6601776070095025115}
|
||||||
|
m_CullTransparentMesh: 1
|
||||||
|
--- !u!114 &1196629119661638923
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 6601776070095025115}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_Color: {r: 0, g: 0, b: 0, a: 1}
|
||||||
|
m_RaycastTarget: 1
|
||||||
|
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
m_Maskable: 1
|
||||||
|
m_OnCullStateChanged:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_Sprite: {fileID: 0}
|
||||||
|
m_Type: 0
|
||||||
|
m_PreserveAspect: 0
|
||||||
|
m_FillCenter: 1
|
||||||
|
m_FillMethod: 4
|
||||||
|
m_FillAmount: 1
|
||||||
|
m_FillClockwise: 1
|
||||||
|
m_FillOrigin: 0
|
||||||
|
m_UseSpriteMesh: 0
|
||||||
|
m_PixelsPerUnitMultiplier: 1
|
||||||
--- !u!1 &6629188623764164050
|
--- !u!1 &6629188623764164050
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|||||||
BIN
Gameton-06/Assets/Gameton/Resources/UI/Story Background/villagers.png
LFS
Normal file
BIN
Gameton-06/Assets/Gameton/Resources/UI/Story Background/villagers.png
LFS
Normal file
Binary file not shown.
@@ -0,0 +1,127 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: c6e00a5e9b6e3e14990f8a857da5627e
|
||||||
|
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: 3
|
||||||
|
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: 3
|
||||||
|
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: 3
|
||||||
|
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
|
||||||
|
spriteSheet:
|
||||||
|
serializedVersion: 2
|
||||||
|
sprites: []
|
||||||
|
outline: []
|
||||||
|
physicsShape: []
|
||||||
|
bones: []
|
||||||
|
spriteID: 5e97eb03825dee720800000000000000
|
||||||
|
internalID: 0
|
||||||
|
vertices: []
|
||||||
|
indices:
|
||||||
|
edges: []
|
||||||
|
weights: []
|
||||||
|
secondaryTextures: []
|
||||||
|
nameFileIdTable: {}
|
||||||
|
mipmapLimitGroupName:
|
||||||
|
pSDRemoveMatte: 0
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -68,5 +68,18 @@ namespace TON
|
|||||||
{
|
{
|
||||||
return LoadAsset<Sprite>($"UI/Ranking Paw/my_rank_box", out result);
|
return LoadAsset<Sprite>($"UI/Ranking Paw/my_rank_box", out result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool LoadIntroBackgroundImage(int index, out Sprite result)
|
||||||
|
{
|
||||||
|
return LoadAsset<Sprite>($"UI/Story Background/intro_background_{index}", out result);
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool LoadIntroVillagerImage(out Sprite result)
|
||||||
|
{
|
||||||
|
return LoadAsset<Sprite>($"UI/Story Background/villagers", out result);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,12 +44,14 @@ namespace TON
|
|||||||
Main.Singleton.Initialize();
|
Main.Singleton.Initialize();
|
||||||
|
|
||||||
// TODO : Custom Order After System Load
|
// TODO : Custom Order After System Load
|
||||||
UIManager.Show<TitleUI>(UIList.TitleUI);
|
// UIManager.Show<TitleUI>(UIList.TitleUI);
|
||||||
|
UIManager.Show<IntroUI>(UIList.IntroUI);
|
||||||
// UIManager.Show<CharaterCreateUI>(UIList.CharaterCreateUI);
|
// UIManager.Show<CharaterCreateUI>(UIList.CharaterCreateUI);
|
||||||
// UIManager.Show<LobbyUI>(UIList.LobbyUI);
|
// UIManager.Show<LobbyUI>(UIList.LobbyUI);
|
||||||
// UIManager.Show<IngameOptionUI>(UIList.IngameOptionUI);
|
// UIManager.Show<IngameOptionUI>(UIList.IngameOptionUI);
|
||||||
// UIManager.Show<SkillSettingUI>(UIList.SkillSettingUI);
|
// UIManager.Show<SkillSettingUI>(UIList.SkillSettingUI);
|
||||||
// PlayerDataManager.Singleton.SetCurrentUserData();
|
PlayerDataManager.Singleton.Initalize();
|
||||||
|
PlayerDataManager.Singleton.SetCurrentUserData();
|
||||||
// UIManager.Show<ControllerUI>(UIList.ControllerUI);
|
// UIManager.Show<ControllerUI>(UIList.ControllerUI);
|
||||||
// ControllerUI.Instance.Initalize();
|
// ControllerUI.Instance.Initalize();
|
||||||
// UIManager.Show<IngameUI>(UIList.IngameUI);
|
// UIManager.Show<IngameUI>(UIList.IngameUI);
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ namespace TON
|
|||||||
None,
|
None,
|
||||||
Empty,
|
Empty,
|
||||||
Title,
|
Title,
|
||||||
|
Intro,
|
||||||
Lobby,
|
Lobby,
|
||||||
Stage,
|
Stage,
|
||||||
Shop,
|
Shop,
|
||||||
@@ -63,6 +64,9 @@ namespace TON
|
|||||||
case SceneType.Title:
|
case SceneType.Title:
|
||||||
StartCoroutine(ChangeScene<TitleScene>(onSceneChangeCompletedCallback));
|
StartCoroutine(ChangeScene<TitleScene>(onSceneChangeCompletedCallback));
|
||||||
break;
|
break;
|
||||||
|
case SceneType.Intro:
|
||||||
|
StartCoroutine(ChangeScene<IntroScene>(onSceneChangeCompletedCallback));
|
||||||
|
break;
|
||||||
case SceneType.Lobby:
|
case SceneType.Lobby:
|
||||||
StartCoroutine(ChangeScene<LobbyScene>(onSceneChangeCompletedCallback));
|
StartCoroutine(ChangeScene<LobbyScene>(onSceneChangeCompletedCallback));
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ namespace TON
|
|||||||
PauseUI, // 일시중지 버튼 선택 시 노출되는 UI
|
PauseUI, // 일시중지 버튼 선택 시 노출되는 UI
|
||||||
GoldPopup,
|
GoldPopup,
|
||||||
GuideUI,
|
GuideUI,
|
||||||
|
IntroUI,
|
||||||
|
|
||||||
POPUP_END,
|
POPUP_END,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,11 +4,11 @@ using UnityEngine;
|
|||||||
|
|
||||||
namespace TON
|
namespace TON
|
||||||
{
|
{
|
||||||
public class IntroStoryDataManager : MonoBehaviour
|
public class IntroStoryDataManager
|
||||||
{
|
{
|
||||||
public List<IntroStoryData> introStories { get; private set; }
|
public List<IntroStoryData> introStories { get; private set; }
|
||||||
|
|
||||||
private void Awake()
|
public void Initialize()
|
||||||
{
|
{
|
||||||
LoadIntroStoryData();
|
LoadIntroStoryData();
|
||||||
}
|
}
|
||||||
|
|||||||
33
Gameton-06/Assets/Gameton/Scripts/Scenes/IntroScene.cs
Normal file
33
Gameton-06/Assets/Gameton/Scripts/Scenes/IntroScene.cs
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEngine.SceneManagement;
|
||||||
|
|
||||||
|
namespace TON
|
||||||
|
{
|
||||||
|
public class IntroScene : SceneBase
|
||||||
|
{
|
||||||
|
public override IEnumerator OnStart()
|
||||||
|
{
|
||||||
|
// Intro 씬을 비동기로 로드한다.
|
||||||
|
AsyncOperation asyncLoad = SceneManager.LoadSceneAsync("Intro", LoadSceneMode.Single);
|
||||||
|
|
||||||
|
// 로드가 완료될 때 까지 yield return null 을 하면서 기다린다
|
||||||
|
while (!asyncLoad.isDone)
|
||||||
|
{
|
||||||
|
yield return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
UIManager.Show<IntroUI>(UIList.IntroUI);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public override IEnumerator OnEnd()
|
||||||
|
{
|
||||||
|
yield return null;
|
||||||
|
|
||||||
|
UIManager.Hide<IntroUI>(UIList.IntroUI);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
11
Gameton-06/Assets/Gameton/Scripts/Scenes/IntroScene.cs.meta
Normal file
11
Gameton-06/Assets/Gameton/Scripts/Scenes/IntroScene.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: ea9529b42ef9b7c47bef041f8d230f63
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -69,7 +69,7 @@ namespace TON
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 선택된 캐릭터 인덱스 정보를 저장 (다음 씬에서도 사용할 수 있도록)
|
// 선택된 캐릭터 인덱스 정보를 저장 (다음 씬에서도 사용할 수 있도록)
|
||||||
PlayerPrefs.SetInt("SelectedPlayerIndex", playerDatas.Count);
|
PlayerPrefs.SetInt("SelectedPlayerIndex", 0);
|
||||||
|
|
||||||
// 캐릭터 이름 입력 모달 활성화
|
// 캐릭터 이름 입력 모달 활성화
|
||||||
characterCreateUI_Modal.SetActive(true);
|
characterCreateUI_Modal.SetActive(true);
|
||||||
@@ -133,7 +133,7 @@ namespace TON
|
|||||||
// 씬 변경
|
// 씬 변경
|
||||||
UIManager.Hide<CharaterCreateUI>(UIList.CharaterCreateUI);
|
UIManager.Hide<CharaterCreateUI>(UIList.CharaterCreateUI);
|
||||||
|
|
||||||
Main.Singleton?.ChangeScene(SceneType.Lobby);
|
Main.Singleton.ChangeScene(SceneType.Lobby);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -65,7 +65,8 @@ namespace TON
|
|||||||
|
|
||||||
UIManager.Hide<CharaterSelectUI>(UIList.CharaterSelectUI);
|
UIManager.Hide<CharaterSelectUI>(UIList.CharaterSelectUI);
|
||||||
|
|
||||||
Main.Singleton?.ChangeScene(SceneType.Lobby);
|
// Main.Singleton.ChangeScene(SceneType.Lobby);
|
||||||
|
Main.Singleton.ChangeScene(SceneType.Intro);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnClickCreateButton()
|
public void OnClickCreateButton()
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using TMPro;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
using UnityEngine.UI;
|
||||||
|
|
||||||
namespace TON
|
namespace TON
|
||||||
{
|
{
|
||||||
@@ -9,12 +11,85 @@ namespace TON
|
|||||||
public List<IntroStoryData> introStories = new List<IntroStoryData>();
|
public List<IntroStoryData> introStories = new List<IntroStoryData>();
|
||||||
|
|
||||||
private IntroStoryDataManager introStoryDataManager;
|
private IntroStoryDataManager introStoryDataManager;
|
||||||
|
private int index = 0;
|
||||||
|
|
||||||
|
[SerializeField] private Image backgroundImage;
|
||||||
|
[SerializeField] private Image speakerImage;
|
||||||
|
[SerializeField] private TextMeshProUGUI speakerText;
|
||||||
|
[SerializeField] private TextMeshProUGUI content;
|
||||||
|
|
||||||
|
|
||||||
private void OnEnable()
|
private void OnEnable()
|
||||||
{
|
{
|
||||||
|
index = 0;
|
||||||
|
|
||||||
introStoryDataManager = new IntroStoryDataManager();
|
introStoryDataManager = new IntroStoryDataManager();
|
||||||
|
|
||||||
|
introStoryDataManager.Initialize();
|
||||||
introStories = introStoryDataManager.introStories;
|
introStories = introStoryDataManager.introStories;
|
||||||
|
|
||||||
|
SetStoryData();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void HandleClickScreen()
|
||||||
|
{
|
||||||
|
if (index == introStories.Count - 1)
|
||||||
|
{
|
||||||
|
Main.Singleton.ChangeScene(SceneType.Lobby);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
index++;
|
||||||
|
SetStoryData();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void SetStoryData()
|
||||||
|
{
|
||||||
|
IntroStoryData storyData = introStories[index];
|
||||||
|
|
||||||
|
content.text = storyData.content;
|
||||||
|
|
||||||
|
if (AssetManager.Singleton.LoadIntroBackgroundImage(index, out Sprite background))
|
||||||
|
{
|
||||||
|
backgroundImage.sprite = background;
|
||||||
|
}
|
||||||
|
|
||||||
|
LoadSpeaker(storyData.speaker);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void LoadSpeaker(string speaker)
|
||||||
|
{
|
||||||
|
PlayerData player = PlayerDataManager.Singleton.player;
|
||||||
|
|
||||||
|
Sprite loadImage = null;
|
||||||
|
|
||||||
|
switch (speaker)
|
||||||
|
{
|
||||||
|
case "me":
|
||||||
|
AssetManager.Singleton.LoadPlayerIcon(player.type, FaceStatue.Idle, out loadImage);
|
||||||
|
speakerText.text = $"{player.name}";
|
||||||
|
break;
|
||||||
|
case "villagers":
|
||||||
|
AssetManager.Singleton.LoadIntroVillagerImage(out loadImage);
|
||||||
|
speakerText.text = "마을 사람들";
|
||||||
|
break;
|
||||||
|
case "dragon":
|
||||||
|
AssetManager.Singleton.LoadMonsterWaveIcon(10, out loadImage);
|
||||||
|
speakerText.text = "사악한 드래곤";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (loadImage != null)
|
||||||
|
{
|
||||||
|
speakerImage.sprite = loadImage;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnClickSkipButton()
|
||||||
|
{
|
||||||
|
Main.Singleton.ChangeScene(SceneType.Lobby);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,13 +37,13 @@ namespace TON
|
|||||||
PlayerPrefs.SetInt("SelectedPlayerIndex", 0);
|
PlayerPrefs.SetInt("SelectedPlayerIndex", 0);
|
||||||
PlayerDataManager.Singleton.SetCurrentUserData();
|
PlayerDataManager.Singleton.SetCurrentUserData();
|
||||||
HeartDataManager.Singleton.SetCurrentUserHeart();
|
HeartDataManager.Singleton.SetCurrentUserHeart();
|
||||||
Main.Singleton?.ChangeScene(SceneType.Lobby);
|
Main.Singleton.ChangeScene(SceneType.Lobby);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnClickExitButton()
|
public void OnClickExitButton()
|
||||||
{
|
{
|
||||||
Main.Singleton?.SystemQuit();
|
Main.Singleton.SystemQuit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user