Merge branch 'main' into DO-54-렌주룰-거짓-금수-잡기
This commit is contained in:
commit
259f73b552
Assets
GameUIController.cs
Resources
Prefabs
Sounds.metaSounds
Click Sound.mp3Click Sound.mp3.metaClose Sound.mp3Close Sound.mp3.metaCoins ADD Sound.wavCoins ADD Sound.wav.metaCoins Empty Sound.wavCoins Empty Sound.wav.metaCoins Remove Sound.wavCoins Remove Sound.wav.metaGame bgm2.mp3Game bgm2.mp3.metalose sound.mp3lose sound.mp3.metamain bgm.mp3main bgm.mp3.metastone sound 3.mp3stone sound 3.mp3.metawin sound.mp3win sound.mp3.meta
Script
Common
Game
Main
UI
Effect
PanelChildController
PanelController
@ -18,10 +18,16 @@ public class GameUIController : MonoBehaviour
|
|||||||
[SerializeField] private Sprite[] profileImageSprites; //0. 기본 드래곤 1. 기본 호랑이 2.아이보리 드래곤 3. 아이보리 호랑이
|
[SerializeField] private Sprite[] profileImageSprites; //0. 기본 드래곤 1. 기본 호랑이 2.아이보리 드래곤 3. 아이보리 호랑이
|
||||||
[SerializeField] private Sprite[] indicatorSprites; //0. active 1. inactive
|
[SerializeField] private Sprite[] indicatorSprites; //0. active 1. inactive
|
||||||
|
|
||||||
|
|
||||||
private Sprite _originalSpriteA;
|
private Sprite _originalSpriteA;
|
||||||
private Sprite _originalSpriteB;
|
private Sprite _originalSpriteB;
|
||||||
|
|
||||||
|
private MultiplayManager _multiplayManager;
|
||||||
|
|
||||||
|
private void Start()
|
||||||
|
{
|
||||||
|
_multiplayManager = GameManager.Instance.GetMultiplayManager();
|
||||||
|
}
|
||||||
|
|
||||||
public void OnClickConfirmButton()
|
public void OnClickConfirmButton()
|
||||||
{
|
{
|
||||||
GameManager.Instance.OnClickConfirmButton();
|
GameManager.Instance.OnClickConfirmButton();
|
||||||
@ -36,12 +42,26 @@ public class GameUIController : MonoBehaviour
|
|||||||
{
|
{
|
||||||
GameManager.Instance.panelManager.OpenConfirmPanel("항복 하시겠습니까?", () =>
|
GameManager.Instance.panelManager.OpenConfirmPanel("항복 하시겠습니까?", () =>
|
||||||
{
|
{
|
||||||
//TODO: 서버에 항복 전달 및 기타 등등
|
_multiplayManager.RequestSurrender();
|
||||||
|
|
||||||
GameManager.Instance.ChangeToMainScene();
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void OnClickDrawRequestButton()
|
||||||
|
{
|
||||||
|
if (GameManager.Instance.GetRequestDrawChance())
|
||||||
|
{
|
||||||
|
GameManager.Instance.panelManager.OpenConfirmPanel("무승부 신청을 하시겠습니까?", () =>
|
||||||
|
{
|
||||||
|
_multiplayManager.RequestDraw();
|
||||||
|
});
|
||||||
|
GameManager.Instance.SetRequestDrawChanceFalse();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
GameManager.Instance.panelManager.OpenConfirmPanel("무승부 요청이 제한돼있습니다.",()=>{});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void OnClickSettingsButton()
|
public void OnClickSettingsButton()
|
||||||
{
|
{
|
||||||
GameManager.Instance.panelManager.OpenSettingsPanel();
|
GameManager.Instance.panelManager.OpenSettingsPanel();
|
||||||
|
@ -527,7 +527,7 @@ GameObject:
|
|||||||
- component: {fileID: 8635639988778983738}
|
- component: {fileID: 8635639988778983738}
|
||||||
- component: {fileID: 4545556044007292713}
|
- component: {fileID: 4545556044007292713}
|
||||||
- component: {fileID: 6152865991947934791}
|
- component: {fileID: 6152865991947934791}
|
||||||
- component: {fileID: 3813612584874639807}
|
- component: {fileID: -2390623514170132953}
|
||||||
m_Layer: 5
|
m_Layer: 5
|
||||||
m_Name: Draw Effect Panel
|
m_Name: Draw Effect Panel
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
@ -576,7 +576,7 @@ MonoBehaviour:
|
|||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
m_Material: {fileID: 0}
|
m_Material: {fileID: 0}
|
||||||
m_Color: {r: 0, g: 0, b: 0, a: 0.5882353}
|
m_Color: {r: 0, g: 0, b: 0, a: 0.74509805}
|
||||||
m_RaycastTarget: 1
|
m_RaycastTarget: 1
|
||||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||||
m_Maskable: 1
|
m_Maskable: 1
|
||||||
@ -625,7 +625,7 @@ MonoBehaviour:
|
|||||||
tigerOpenEyes: {fileID: 1508819185250841244}
|
tigerOpenEyes: {fileID: 1508819185250841244}
|
||||||
tigerCloseEyes: {fileID: 399504369641388738}
|
tigerCloseEyes: {fileID: 399504369641388738}
|
||||||
flipDuration: 0.3
|
flipDuration: 0.3
|
||||||
--- !u!61 &3813612584874639807
|
--- !u!61 &-2390623514170132953
|
||||||
BoxCollider2D:
|
BoxCollider2D:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
@ -450,7 +450,7 @@ GameObject:
|
|||||||
- component: {fileID: 8635639988778983738}
|
- component: {fileID: 8635639988778983738}
|
||||||
- component: {fileID: 4545556044007292713}
|
- component: {fileID: 4545556044007292713}
|
||||||
- component: {fileID: 3229800624310508893}
|
- component: {fileID: 3229800624310508893}
|
||||||
- component: {fileID: 6984539173991577744}
|
- component: {fileID: -8338910938938253639}
|
||||||
m_Layer: 5
|
m_Layer: 5
|
||||||
m_Name: Lose Effect Panel
|
m_Name: Lose Effect Panel
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
@ -500,7 +500,7 @@ MonoBehaviour:
|
|||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
m_Material: {fileID: 0}
|
m_Material: {fileID: 0}
|
||||||
m_Color: {r: 0, g: 0, b: 0, a: 0.5882353}
|
m_Color: {r: 0, g: 0, b: 0, a: 0.74509805}
|
||||||
m_RaycastTarget: 1
|
m_RaycastTarget: 1
|
||||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||||
m_Maskable: 1
|
m_Maskable: 1
|
||||||
@ -547,7 +547,7 @@ MonoBehaviour:
|
|||||||
characterOpenEyes: {fileID: 1632927645355555415}
|
characterOpenEyes: {fileID: 1632927645355555415}
|
||||||
characterCloseEyes: {fileID: 3881260292094838299}
|
characterCloseEyes: {fileID: 3881260292094838299}
|
||||||
depressedEffect: {fileID: 155037671892554820}
|
depressedEffect: {fileID: 155037671892554820}
|
||||||
--- !u!61 &6984539173991577744
|
--- !u!61 &-8338910938938253639
|
||||||
BoxCollider2D:
|
BoxCollider2D:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
@ -788,7 +788,7 @@ GameObject:
|
|||||||
- component: {fileID: 8635639988778983738}
|
- component: {fileID: 8635639988778983738}
|
||||||
- component: {fileID: 3127148509640414758}
|
- component: {fileID: 3127148509640414758}
|
||||||
- component: {fileID: 4545556044007292713}
|
- component: {fileID: 4545556044007292713}
|
||||||
- component: {fileID: 7229651074095795597}
|
- component: {fileID: -8628578634938139601}
|
||||||
m_Layer: 5
|
m_Layer: 5
|
||||||
m_Name: Win Effect Panel
|
m_Name: Win Effect Panel
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
@ -838,7 +838,7 @@ MonoBehaviour:
|
|||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
m_Material: {fileID: 0}
|
m_Material: {fileID: 0}
|
||||||
m_Color: {r: 0, g: 0, b: 0, a: 0.5882353}
|
m_Color: {r: 0, g: 0, b: 0, a: 0.74509805}
|
||||||
m_RaycastTarget: 1
|
m_RaycastTarget: 1
|
||||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||||
m_Maskable: 1
|
m_Maskable: 1
|
||||||
@ -867,7 +867,7 @@ MonoBehaviour:
|
|||||||
m_Script: {fileID: 11500000, guid: 9b132148519758c42824252ec9a2d3a4, type: 3}
|
m_Script: {fileID: 11500000, guid: 9b132148519758c42824252ec9a2d3a4, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
bannerObj: {fileID: 0}
|
bannerObj: {fileID: 7291411618834705046}
|
||||||
bannerText: {fileID: 5108301403921453943}
|
bannerText: {fileID: 5108301403921453943}
|
||||||
interval: 0.1
|
interval: 0.1
|
||||||
haloEffectImg: {fileID: 376994097320605198}
|
haloEffectImg: {fileID: 376994097320605198}
|
||||||
@ -891,7 +891,7 @@ CanvasGroup:
|
|||||||
m_Interactable: 1
|
m_Interactable: 1
|
||||||
m_BlocksRaycasts: 1
|
m_BlocksRaycasts: 1
|
||||||
m_IgnoreParentGroups: 0
|
m_IgnoreParentGroups: 0
|
||||||
--- !u!61 &7229651074095795597
|
--- !u!61 &-8628578634938139601
|
||||||
BoxCollider2D:
|
BoxCollider2D:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
852
Assets/Resources/Prefabs/Panels/Draw Confirm Panel.prefab
Normal file
852
Assets/Resources/Prefabs/Panels/Draw Confirm Panel.prefab
Normal file
@ -0,0 +1,852 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!1 &1788897315818053684
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 7542555801726495289}
|
||||||
|
- component: {fileID: 2282488759583336750}
|
||||||
|
- component: {fileID: 773857893073654059}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: Messege Text
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &7542555801726495289
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1788897315818053684}
|
||||||
|
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: 1049729465715420315}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||||
|
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||||
|
m_AnchoredPosition: {x: 0, y: 38}
|
||||||
|
m_SizeDelta: {x: 480, y: 150}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!222 &2282488759583336750
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1788897315818053684}
|
||||||
|
m_CullTransparentMesh: 1
|
||||||
|
--- !u!114 &773857893073654059
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1788897315818053684}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_Color: {r: 1, g: 1, b: 1, 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_text: messege text
|
||||||
|
m_isRightToLeft: 0
|
||||||
|
m_fontAsset: {fileID: 11400000, guid: 85a19688db53c77469fc4406b01045da, type: 2}
|
||||||
|
m_sharedMaterial: {fileID: -2477908578676791210, guid: 85a19688db53c77469fc4406b01045da, type: 2}
|
||||||
|
m_fontSharedMaterials: []
|
||||||
|
m_fontMaterial: {fileID: 0}
|
||||||
|
m_fontMaterials: []
|
||||||
|
m_fontColor32:
|
||||||
|
serializedVersion: 2
|
||||||
|
rgba: 4278190080
|
||||||
|
m_fontColor: {r: 0, g: 0, b: 0, a: 1}
|
||||||
|
m_enableVertexGradient: 0
|
||||||
|
m_colorMode: 3
|
||||||
|
m_fontColorGradient:
|
||||||
|
topLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
topRight: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
bottomRight: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
m_fontColorGradientPreset: {fileID: 0}
|
||||||
|
m_spriteAsset: {fileID: 0}
|
||||||
|
m_tintAllSprites: 0
|
||||||
|
m_StyleSheet: {fileID: 0}
|
||||||
|
m_TextStyleHashCode: -1183493901
|
||||||
|
m_overrideHtmlColors: 0
|
||||||
|
m_faceColor:
|
||||||
|
serializedVersion: 2
|
||||||
|
rgba: 4294967295
|
||||||
|
m_fontSize: 36
|
||||||
|
m_fontSizeBase: 36
|
||||||
|
m_fontWeight: 400
|
||||||
|
m_enableAutoSizing: 0
|
||||||
|
m_fontSizeMin: 18
|
||||||
|
m_fontSizeMax: 72
|
||||||
|
m_fontStyle: 0
|
||||||
|
m_HorizontalAlignment: 2
|
||||||
|
m_VerticalAlignment: 512
|
||||||
|
m_textAlignment: 65535
|
||||||
|
m_characterSpacing: 0
|
||||||
|
m_wordSpacing: 0
|
||||||
|
m_lineSpacing: 0
|
||||||
|
m_lineSpacingMax: 0
|
||||||
|
m_paragraphSpacing: 0
|
||||||
|
m_charWidthMaxAdj: 0
|
||||||
|
m_enableWordWrapping: 1
|
||||||
|
m_wordWrappingRatios: 0.4
|
||||||
|
m_overflowMode: 0
|
||||||
|
m_linkedTextComponent: {fileID: 0}
|
||||||
|
parentLinkedComponent: {fileID: 0}
|
||||||
|
m_enableKerning: 1
|
||||||
|
m_enableExtraPadding: 0
|
||||||
|
checkPaddingRequired: 0
|
||||||
|
m_isRichText: 1
|
||||||
|
m_parseCtrlCharacters: 1
|
||||||
|
m_isOrthographic: 1
|
||||||
|
m_isCullingEnabled: 0
|
||||||
|
m_horizontalMapping: 0
|
||||||
|
m_verticalMapping: 0
|
||||||
|
m_uvLineOffset: 0
|
||||||
|
m_geometrySortingOrder: 0
|
||||||
|
m_IsTextObjectScaleStatic: 0
|
||||||
|
m_VertexBufferAutoSizeReduction: 0
|
||||||
|
m_useMaxVisibleDescender: 1
|
||||||
|
m_pageToDisplay: 1
|
||||||
|
m_margin: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
m_isUsingLegacyAnimationComponent: 0
|
||||||
|
m_isVolumetricText: 0
|
||||||
|
m_hasFontAssetChanged: 0
|
||||||
|
m_baseMaterial: {fileID: 0}
|
||||||
|
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
--- !u!1 &2317228258542092256
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 965302526599391686}
|
||||||
|
- component: {fileID: 8494676347912440962}
|
||||||
|
- component: {fileID: 1257633341820217709}
|
||||||
|
- component: {fileID: 1753961836956471979}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: Yes Button
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &965302526599391686
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 2317228258542092256}
|
||||||
|
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:
|
||||||
|
- {fileID: 1946490149580320571}
|
||||||
|
m_Father: {fileID: 1049729465715420315}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||||
|
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||||
|
m_AnchoredPosition: {x: -100, y: -120}
|
||||||
|
m_SizeDelta: {x: 140, y: 80}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!222 &8494676347912440962
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 2317228258542092256}
|
||||||
|
m_CullTransparentMesh: 1
|
||||||
|
--- !u!114 &1257633341820217709
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 2317228258542092256}
|
||||||
|
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: 1, g: 0.9607844, b: 0.8980393, 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: 21300000, guid: 05a670e614d7817429ee256ceb7efbe6, type: 3}
|
||||||
|
m_Type: 1
|
||||||
|
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!114 &1753961836956471979
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 2317228258542092256}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Navigation:
|
||||||
|
m_Mode: 3
|
||||||
|
m_WrapAround: 0
|
||||||
|
m_SelectOnUp: {fileID: 0}
|
||||||
|
m_SelectOnDown: {fileID: 0}
|
||||||
|
m_SelectOnLeft: {fileID: 0}
|
||||||
|
m_SelectOnRight: {fileID: 0}
|
||||||
|
m_Transition: 2
|
||||||
|
m_Colors:
|
||||||
|
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||||
|
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
|
||||||
|
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||||
|
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
|
||||||
|
m_ColorMultiplier: 1
|
||||||
|
m_FadeDuration: 0.1
|
||||||
|
m_SpriteState:
|
||||||
|
m_HighlightedSprite: {fileID: 21300000, guid: 1cc2af2fc6476554ca42fb2ddfd7727f, type: 3}
|
||||||
|
m_PressedSprite: {fileID: 21300000, guid: 1cc2af2fc6476554ca42fb2ddfd7727f, type: 3}
|
||||||
|
m_SelectedSprite: {fileID: 0}
|
||||||
|
m_DisabledSprite: {fileID: 0}
|
||||||
|
m_AnimationTriggers:
|
||||||
|
m_NormalTrigger: Normal
|
||||||
|
m_HighlightedTrigger: Highlighted
|
||||||
|
m_PressedTrigger: Pressed
|
||||||
|
m_SelectedTrigger: Selected
|
||||||
|
m_DisabledTrigger: Disabled
|
||||||
|
m_Interactable: 1
|
||||||
|
m_TargetGraphic: {fileID: 1257633341820217709}
|
||||||
|
m_OnClick:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls:
|
||||||
|
- m_Target: {fileID: 4442644643121240978}
|
||||||
|
m_TargetAssemblyTypeName: DrawConfirmPanelController, Assembly-CSharp
|
||||||
|
m_MethodName: OnClickConfirmButton
|
||||||
|
m_Mode: 1
|
||||||
|
m_Arguments:
|
||||||
|
m_ObjectArgument: {fileID: 0}
|
||||||
|
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||||
|
m_IntArgument: 0
|
||||||
|
m_FloatArgument: 0
|
||||||
|
m_StringArgument:
|
||||||
|
m_BoolArgument: 0
|
||||||
|
m_CallState: 2
|
||||||
|
--- !u!1 &3698158704839373389
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 9064896642958720613}
|
||||||
|
- component: {fileID: 2999493526827262555}
|
||||||
|
- component: {fileID: 7391042004064192362}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: Text (TMP)
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &9064896642958720613
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 3698158704839373389}
|
||||||
|
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: 985363981920635096}
|
||||||
|
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: 7.5}
|
||||||
|
m_SizeDelta: {x: 0, y: -15}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!222 &2999493526827262555
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 3698158704839373389}
|
||||||
|
m_CullTransparentMesh: 1
|
||||||
|
--- !u!114 &7391042004064192362
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 3698158704839373389}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_Color: {r: 1, g: 1, b: 1, 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_text: "\uC544\uB2C8\uC694"
|
||||||
|
m_isRightToLeft: 0
|
||||||
|
m_fontAsset: {fileID: 11400000, guid: 85a19688db53c77469fc4406b01045da, type: 2}
|
||||||
|
m_sharedMaterial: {fileID: -2477908578676791210, guid: 85a19688db53c77469fc4406b01045da, type: 2}
|
||||||
|
m_fontSharedMaterials: []
|
||||||
|
m_fontMaterial: {fileID: 0}
|
||||||
|
m_fontMaterials: []
|
||||||
|
m_fontColor32:
|
||||||
|
serializedVersion: 2
|
||||||
|
rgba: 4278190080
|
||||||
|
m_fontColor: {r: 0, g: 0, b: 0, a: 1}
|
||||||
|
m_enableVertexGradient: 0
|
||||||
|
m_colorMode: 3
|
||||||
|
m_fontColorGradient:
|
||||||
|
topLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
topRight: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
bottomRight: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
m_fontColorGradientPreset: {fileID: 0}
|
||||||
|
m_spriteAsset: {fileID: 0}
|
||||||
|
m_tintAllSprites: 0
|
||||||
|
m_StyleSheet: {fileID: 0}
|
||||||
|
m_TextStyleHashCode: -1183493901
|
||||||
|
m_overrideHtmlColors: 0
|
||||||
|
m_faceColor:
|
||||||
|
serializedVersion: 2
|
||||||
|
rgba: 4294967295
|
||||||
|
m_fontSize: 36
|
||||||
|
m_fontSizeBase: 36
|
||||||
|
m_fontWeight: 400
|
||||||
|
m_enableAutoSizing: 0
|
||||||
|
m_fontSizeMin: 18
|
||||||
|
m_fontSizeMax: 72
|
||||||
|
m_fontStyle: 0
|
||||||
|
m_HorizontalAlignment: 2
|
||||||
|
m_VerticalAlignment: 512
|
||||||
|
m_textAlignment: 65535
|
||||||
|
m_characterSpacing: 0
|
||||||
|
m_wordSpacing: 0
|
||||||
|
m_lineSpacing: 0
|
||||||
|
m_lineSpacingMax: 0
|
||||||
|
m_paragraphSpacing: 0
|
||||||
|
m_charWidthMaxAdj: 0
|
||||||
|
m_enableWordWrapping: 1
|
||||||
|
m_wordWrappingRatios: 0.4
|
||||||
|
m_overflowMode: 0
|
||||||
|
m_linkedTextComponent: {fileID: 0}
|
||||||
|
parentLinkedComponent: {fileID: 0}
|
||||||
|
m_enableKerning: 1
|
||||||
|
m_enableExtraPadding: 0
|
||||||
|
checkPaddingRequired: 0
|
||||||
|
m_isRichText: 1
|
||||||
|
m_parseCtrlCharacters: 1
|
||||||
|
m_isOrthographic: 1
|
||||||
|
m_isCullingEnabled: 0
|
||||||
|
m_horizontalMapping: 0
|
||||||
|
m_verticalMapping: 0
|
||||||
|
m_uvLineOffset: 0
|
||||||
|
m_geometrySortingOrder: 0
|
||||||
|
m_IsTextObjectScaleStatic: 0
|
||||||
|
m_VertexBufferAutoSizeReduction: 0
|
||||||
|
m_useMaxVisibleDescender: 1
|
||||||
|
m_pageToDisplay: 1
|
||||||
|
m_margin: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
m_isUsingLegacyAnimationComponent: 0
|
||||||
|
m_isVolumetricText: 0
|
||||||
|
m_hasFontAssetChanged: 0
|
||||||
|
m_baseMaterial: {fileID: 0}
|
||||||
|
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
--- !u!1 &4661890517030743811
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 1946490149580320571}
|
||||||
|
- component: {fileID: 3931044922440075362}
|
||||||
|
- component: {fileID: 555572636850183268}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: Text (TMP)
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &1946490149580320571
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4661890517030743811}
|
||||||
|
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: 965302526599391686}
|
||||||
|
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: 7.4999886}
|
||||||
|
m_SizeDelta: {x: 0, y: -15.000023}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!222 &3931044922440075362
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4661890517030743811}
|
||||||
|
m_CullTransparentMesh: 1
|
||||||
|
--- !u!114 &555572636850183268
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4661890517030743811}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_Color: {r: 1, g: 1, b: 1, 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_text: "\uC608"
|
||||||
|
m_isRightToLeft: 0
|
||||||
|
m_fontAsset: {fileID: 11400000, guid: 85a19688db53c77469fc4406b01045da, type: 2}
|
||||||
|
m_sharedMaterial: {fileID: -2477908578676791210, guid: 85a19688db53c77469fc4406b01045da, type: 2}
|
||||||
|
m_fontSharedMaterials: []
|
||||||
|
m_fontMaterial: {fileID: 0}
|
||||||
|
m_fontMaterials: []
|
||||||
|
m_fontColor32:
|
||||||
|
serializedVersion: 2
|
||||||
|
rgba: 4278190080
|
||||||
|
m_fontColor: {r: 0, g: 0, b: 0, a: 1}
|
||||||
|
m_enableVertexGradient: 0
|
||||||
|
m_colorMode: 3
|
||||||
|
m_fontColorGradient:
|
||||||
|
topLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
topRight: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
bottomRight: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
m_fontColorGradientPreset: {fileID: 0}
|
||||||
|
m_spriteAsset: {fileID: 0}
|
||||||
|
m_tintAllSprites: 0
|
||||||
|
m_StyleSheet: {fileID: 0}
|
||||||
|
m_TextStyleHashCode: -1183493901
|
||||||
|
m_overrideHtmlColors: 0
|
||||||
|
m_faceColor:
|
||||||
|
serializedVersion: 2
|
||||||
|
rgba: 4294967295
|
||||||
|
m_fontSize: 36
|
||||||
|
m_fontSizeBase: 36
|
||||||
|
m_fontWeight: 400
|
||||||
|
m_enableAutoSizing: 0
|
||||||
|
m_fontSizeMin: 18
|
||||||
|
m_fontSizeMax: 72
|
||||||
|
m_fontStyle: 0
|
||||||
|
m_HorizontalAlignment: 2
|
||||||
|
m_VerticalAlignment: 512
|
||||||
|
m_textAlignment: 65535
|
||||||
|
m_characterSpacing: 0
|
||||||
|
m_wordSpacing: 0
|
||||||
|
m_lineSpacing: 0
|
||||||
|
m_lineSpacingMax: 0
|
||||||
|
m_paragraphSpacing: 0
|
||||||
|
m_charWidthMaxAdj: 0
|
||||||
|
m_enableWordWrapping: 1
|
||||||
|
m_wordWrappingRatios: 0.4
|
||||||
|
m_overflowMode: 0
|
||||||
|
m_linkedTextComponent: {fileID: 0}
|
||||||
|
parentLinkedComponent: {fileID: 0}
|
||||||
|
m_enableKerning: 1
|
||||||
|
m_enableExtraPadding: 0
|
||||||
|
checkPaddingRequired: 0
|
||||||
|
m_isRichText: 1
|
||||||
|
m_parseCtrlCharacters: 1
|
||||||
|
m_isOrthographic: 1
|
||||||
|
m_isCullingEnabled: 0
|
||||||
|
m_horizontalMapping: 0
|
||||||
|
m_verticalMapping: 0
|
||||||
|
m_uvLineOffset: 0
|
||||||
|
m_geometrySortingOrder: 0
|
||||||
|
m_IsTextObjectScaleStatic: 0
|
||||||
|
m_VertexBufferAutoSizeReduction: 0
|
||||||
|
m_useMaxVisibleDescender: 1
|
||||||
|
m_pageToDisplay: 1
|
||||||
|
m_margin: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
m_isUsingLegacyAnimationComponent: 0
|
||||||
|
m_isVolumetricText: 0
|
||||||
|
m_hasFontAssetChanged: 0
|
||||||
|
m_baseMaterial: {fileID: 0}
|
||||||
|
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
--- !u!1 &8145365568262946399
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 5614572128744664879}
|
||||||
|
- component: {fileID: 3728636385802151783}
|
||||||
|
- component: {fileID: 3609920769045485995}
|
||||||
|
- component: {fileID: 949980890983110046}
|
||||||
|
- component: {fileID: 4442644643121240978}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: Draw Confirm Panel
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &5614572128744664879
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 8145365568262946399}
|
||||||
|
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:
|
||||||
|
- {fileID: 1049729465715420315}
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
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: 0, y: 0}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!222 &3728636385802151783
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 8145365568262946399}
|
||||||
|
m_CullTransparentMesh: 1
|
||||||
|
--- !u!114 &3609920769045485995
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 8145365568262946399}
|
||||||
|
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: 0.74509805}
|
||||||
|
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: 10907, guid: 0000000000000000f000000000000000, type: 0}
|
||||||
|
m_Type: 1
|
||||||
|
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!225 &949980890983110046
|
||||||
|
CanvasGroup:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 8145365568262946399}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_Alpha: 1
|
||||||
|
m_Interactable: 1
|
||||||
|
m_BlocksRaycasts: 1
|
||||||
|
m_IgnoreParentGroups: 0
|
||||||
|
--- !u!114 &4442644643121240978
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 8145365568262946399}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 1ebb6563d04ba2b44b06891880cbe0b6, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
panelRectTransform: {fileID: 1049729465715420315}
|
||||||
|
messageText: {fileID: 773857893073654059}
|
||||||
|
--- !u!1 &8611399693750823341
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 1049729465715420315}
|
||||||
|
- component: {fileID: 6012768702964141829}
|
||||||
|
- component: {fileID: 5029524648726594707}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: Panel
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &1049729465715420315
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 8611399693750823341}
|
||||||
|
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:
|
||||||
|
- {fileID: 7542555801726495289}
|
||||||
|
- {fileID: 965302526599391686}
|
||||||
|
- {fileID: 985363981920635096}
|
||||||
|
m_Father: {fileID: 5614572128744664879}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||||
|
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||||
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
|
m_SizeDelta: {x: 600, y: 400}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!222 &6012768702964141829
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 8611399693750823341}
|
||||||
|
m_CullTransparentMesh: 1
|
||||||
|
--- !u!114 &5029524648726594707
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 8611399693750823341}
|
||||||
|
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: 1, g: 1, b: 1, 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: 21300000, guid: e89f6694961e7574b98368e14934a8b1, type: 3}
|
||||||
|
m_Type: 1
|
||||||
|
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 &8664974708086771355
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 985363981920635096}
|
||||||
|
- component: {fileID: 6738990646649674804}
|
||||||
|
- component: {fileID: 4523293559331202638}
|
||||||
|
- component: {fileID: 3091834035832018361}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: No Button
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &985363981920635096
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 8664974708086771355}
|
||||||
|
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:
|
||||||
|
- {fileID: 9064896642958720613}
|
||||||
|
m_Father: {fileID: 1049729465715420315}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||||
|
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||||
|
m_AnchoredPosition: {x: 100, y: -120}
|
||||||
|
m_SizeDelta: {x: 140, y: 80}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!222 &6738990646649674804
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 8664974708086771355}
|
||||||
|
m_CullTransparentMesh: 1
|
||||||
|
--- !u!114 &4523293559331202638
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 8664974708086771355}
|
||||||
|
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: 1, g: 0.9607844, b: 0.8980393, 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: 21300000, guid: 05a670e614d7817429ee256ceb7efbe6, type: 3}
|
||||||
|
m_Type: 1
|
||||||
|
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!114 &3091834035832018361
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 8664974708086771355}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Navigation:
|
||||||
|
m_Mode: 3
|
||||||
|
m_WrapAround: 0
|
||||||
|
m_SelectOnUp: {fileID: 0}
|
||||||
|
m_SelectOnDown: {fileID: 0}
|
||||||
|
m_SelectOnLeft: {fileID: 0}
|
||||||
|
m_SelectOnRight: {fileID: 0}
|
||||||
|
m_Transition: 2
|
||||||
|
m_Colors:
|
||||||
|
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||||
|
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
|
||||||
|
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||||
|
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
|
||||||
|
m_ColorMultiplier: 1
|
||||||
|
m_FadeDuration: 0.1
|
||||||
|
m_SpriteState:
|
||||||
|
m_HighlightedSprite: {fileID: 21300000, guid: 1cc2af2fc6476554ca42fb2ddfd7727f, type: 3}
|
||||||
|
m_PressedSprite: {fileID: 21300000, guid: 1cc2af2fc6476554ca42fb2ddfd7727f, type: 3}
|
||||||
|
m_SelectedSprite: {fileID: 0}
|
||||||
|
m_DisabledSprite: {fileID: 0}
|
||||||
|
m_AnimationTriggers:
|
||||||
|
m_NormalTrigger: Normal
|
||||||
|
m_HighlightedTrigger: Highlighted
|
||||||
|
m_PressedTrigger: Pressed
|
||||||
|
m_SelectedTrigger: Selected
|
||||||
|
m_DisabledTrigger: Disabled
|
||||||
|
m_Interactable: 1
|
||||||
|
m_TargetGraphic: {fileID: 4523293559331202638}
|
||||||
|
m_OnClick:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls:
|
||||||
|
- m_Target: {fileID: 4442644643121240978}
|
||||||
|
m_TargetAssemblyTypeName: DrawConfirmPanelController, Assembly-CSharp
|
||||||
|
m_MethodName: OnClickCloseButton
|
||||||
|
m_Mode: 1
|
||||||
|
m_Arguments:
|
||||||
|
m_ObjectArgument: {fileID: 0}
|
||||||
|
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||||
|
m_IntArgument: 0
|
||||||
|
m_FloatArgument: 0
|
||||||
|
m_StringArgument:
|
||||||
|
m_BoolArgument: 0
|
||||||
|
m_CallState: 2
|
@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: a498b5b3f7af42d4d974507473a6f8a0
|
||||||
|
PrefabImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
@ -1457,7 +1457,7 @@ GameObject:
|
|||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
m_StaticEditorFlags: 0
|
m_StaticEditorFlags: 0
|
||||||
m_IsActive: 0
|
m_IsActive: 1
|
||||||
--- !u!224 &405965270916774547
|
--- !u!224 &405965270916774547
|
||||||
RectTransform:
|
RectTransform:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -1713,7 +1713,7 @@ MonoBehaviour:
|
|||||||
m_OnCullStateChanged:
|
m_OnCullStateChanged:
|
||||||
m_PersistentCalls:
|
m_PersistentCalls:
|
||||||
m_Calls: []
|
m_Calls: []
|
||||||
m_text: "\uD654\uB791\uB098\uBE44"
|
m_text: tester
|
||||||
m_isRightToLeft: 0
|
m_isRightToLeft: 0
|
||||||
m_fontAsset: {fileID: 11400000, guid: 85a19688db53c77469fc4406b01045da, type: 2}
|
m_fontAsset: {fileID: 11400000, guid: 85a19688db53c77469fc4406b01045da, type: 2}
|
||||||
m_sharedMaterial: {fileID: -2477908578676791210, guid: 85a19688db53c77469fc4406b01045da, type: 2}
|
m_sharedMaterial: {fileID: -2477908578676791210, guid: 85a19688db53c77469fc4406b01045da, type: 2}
|
||||||
@ -1799,7 +1799,7 @@ GameObject:
|
|||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
m_StaticEditorFlags: 0
|
m_StaticEditorFlags: 0
|
||||||
m_IsActive: 1
|
m_IsActive: 0
|
||||||
--- !u!224 &8172929902404983356
|
--- !u!224 &8172929902404983356
|
||||||
RectTransform:
|
RectTransform:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -14,7 +14,7 @@ GameObject:
|
|||||||
- component: {fileID: 6789969287113785900}
|
- component: {fileID: 6789969287113785900}
|
||||||
- component: {fileID: 413977444317235173}
|
- component: {fileID: 413977444317235173}
|
||||||
m_Layer: 5
|
m_Layer: 5
|
||||||
m_Name: Switch
|
m_Name: BGM Switch
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
@ -762,7 +762,7 @@ GameObject:
|
|||||||
- component: {fileID: 3464089222698319368}
|
- component: {fileID: 3464089222698319368}
|
||||||
- component: {fileID: 8434701791193156984}
|
- component: {fileID: 8434701791193156984}
|
||||||
m_Layer: 5
|
m_Layer: 5
|
||||||
m_Name: Switch
|
m_Name: SFX Switch
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
|
@ -36,7 +36,7 @@ RectTransform:
|
|||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0, y: 1}
|
m_AnchorMin: {x: 0, y: 1}
|
||||||
m_AnchorMax: {x: 0, y: 1}
|
m_AnchorMax: {x: 0, y: 1}
|
||||||
m_AnchoredPosition: {x: 50, y: -85}
|
m_AnchoredPosition: {x: 50, y: -20}
|
||||||
m_SizeDelta: {x: 238, y: 150}
|
m_SizeDelta: {x: 238, y: 150}
|
||||||
m_Pivot: {x: 0, y: 1}
|
m_Pivot: {x: 0, y: 1}
|
||||||
--- !u!222 &4747539784995484548
|
--- !u!222 &4747539784995484548
|
||||||
@ -338,7 +338,7 @@ MonoBehaviour:
|
|||||||
m_OnCullStateChanged:
|
m_OnCullStateChanged:
|
||||||
m_PersistentCalls:
|
m_PersistentCalls:
|
||||||
m_Calls: []
|
m_Calls: []
|
||||||
m_text: "\uC7AC\uB300\uACB0"
|
m_text: "\uBB34\uC2B9\uBD80"
|
||||||
m_isRightToLeft: 0
|
m_isRightToLeft: 0
|
||||||
m_fontAsset: {fileID: 11400000, guid: 85a19688db53c77469fc4406b01045da, type: 2}
|
m_fontAsset: {fileID: 11400000, guid: 85a19688db53c77469fc4406b01045da, type: 2}
|
||||||
m_sharedMaterial: {fileID: -2477908578676791210, guid: 85a19688db53c77469fc4406b01045da, type: 2}
|
m_sharedMaterial: {fileID: -2477908578676791210, guid: 85a19688db53c77469fc4406b01045da, type: 2}
|
||||||
@ -789,7 +789,7 @@ GameObject:
|
|||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
m_StaticEditorFlags: 0
|
m_StaticEditorFlags: 0
|
||||||
m_IsActive: 0
|
m_IsActive: 1
|
||||||
--- !u!224 &3928015243027423495
|
--- !u!224 &3928015243027423495
|
||||||
RectTransform:
|
RectTransform:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -807,7 +807,7 @@ RectTransform:
|
|||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0, y: 1}
|
m_AnchorMin: {x: 0, y: 1}
|
||||||
m_AnchorMax: {x: 0, y: 1}
|
m_AnchorMax: {x: 0, y: 1}
|
||||||
m_AnchoredPosition: {x: 50, y: -85}
|
m_AnchoredPosition: {x: 50, y: -170}
|
||||||
m_SizeDelta: {x: 238, y: 150}
|
m_SizeDelta: {x: 238, y: 150}
|
||||||
m_Pivot: {x: 0, y: 1}
|
m_Pivot: {x: 0, y: 1}
|
||||||
--- !u!222 &3058652260737614200
|
--- !u!222 &3058652260737614200
|
||||||
@ -894,7 +894,7 @@ MonoBehaviour:
|
|||||||
m_Calls:
|
m_Calls:
|
||||||
- m_Target: {fileID: 3933575647777291622}
|
- m_Target: {fileID: 3933575647777291622}
|
||||||
m_TargetAssemblyTypeName: GameUIController, Assembly-CSharp
|
m_TargetAssemblyTypeName: GameUIController, Assembly-CSharp
|
||||||
m_MethodName: OnClickRetryButton
|
m_MethodName: OnClickDrawRequestButton
|
||||||
m_Mode: 1
|
m_Mode: 1
|
||||||
m_Arguments:
|
m_Arguments:
|
||||||
m_ObjectArgument: {fileID: 0}
|
m_ObjectArgument: {fileID: 0}
|
||||||
|
8
Assets/Resources/Sounds.meta
Normal file
8
Assets/Resources/Sounds.meta
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 9fc9c29bf8c5aa040aaeace773096d1b
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
0
Assets/Resources/Coins_Remove_Sound.wav.meta → Assets/Resources/Sounds/Coins Remove Sound.wav.meta
0
Assets/Resources/Coins_Remove_Sound.wav.meta → Assets/Resources/Sounds/Coins Remove Sound.wav.meta
@ -1,21 +1,12 @@
|
|||||||
using UnityEngine;
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
using UnityEngine.SceneManagement;
|
using UnityEngine.SceneManagement;
|
||||||
using UnityEngine.Timeline;
|
using UnityEngine.Timeline;
|
||||||
|
|
||||||
public class AudioManager : Singleton<AudioManager>
|
public class AudioManager : Singleton<AudioManager>
|
||||||
{
|
{
|
||||||
[Header("BGM")]
|
private AudioClip mainBgm;
|
||||||
[SerializeField] private AudioClip mainBgm;
|
private AudioClip gameBgm;
|
||||||
[SerializeField] private AudioClip gameBgm;
|
|
||||||
[Header("SFX")]
|
|
||||||
[SerializeField] private AudioClip clickSound;
|
|
||||||
[SerializeField] private AudioClip closeSound;
|
|
||||||
[SerializeField] private AudioClip coinsAddSound;
|
|
||||||
[SerializeField] private AudioClip coinsEmptySound;
|
|
||||||
[SerializeField] private AudioClip coinsRemoveSound;
|
|
||||||
[SerializeField] private AudioClip winSound;
|
|
||||||
[SerializeField] private AudioClip loseSound;
|
|
||||||
[SerializeField] private AudioClip stoneSound;
|
|
||||||
|
|
||||||
[HideInInspector] public AudioSource bgmAudioSource; // BGM을 위한 AudioSource
|
[HideInInspector] public AudioSource bgmAudioSource; // BGM을 위한 AudioSource
|
||||||
private AudioSource sfxAudioSource; // SFX를 위한 AudioSource
|
private AudioSource sfxAudioSource; // SFX를 위한 AudioSource
|
||||||
@ -25,13 +16,40 @@ public class AudioManager : Singleton<AudioManager>
|
|||||||
[HideInInspector]public bool isPlayBGM;
|
[HideInInspector]public bool isPlayBGM;
|
||||||
[HideInInspector]public bool isPlaySFX;
|
[HideInInspector]public bool isPlaySFX;
|
||||||
|
|
||||||
private void Awake()
|
private Dictionary<string, AudioClip> audioClips = new Dictionary<string, AudioClip>();
|
||||||
|
|
||||||
|
|
||||||
|
protected override void Awake()
|
||||||
{
|
{
|
||||||
base.Awake(); // 부모 클래스의 Awake 호출
|
base.Awake(); // 부모 클래스의 Awake 호출
|
||||||
|
|
||||||
// BGM과 SFX를 위한 별도의 AudioSource 생성
|
// BGM과 SFX를 위한 별도의 AudioSource 생성
|
||||||
bgmAudioSource = gameObject.AddComponent<AudioSource>();
|
bgmAudioSource = gameObject.AddComponent<AudioSource>();
|
||||||
sfxAudioSource = gameObject.AddComponent<AudioSource>();
|
sfxAudioSource = gameObject.AddComponent<AudioSource>();
|
||||||
|
|
||||||
|
//Sounds폴더 내의 모든 오디오클립 로드
|
||||||
|
AudioClip[] clips = Resources.LoadAll<AudioClip>("Sounds");
|
||||||
|
|
||||||
|
foreach (AudioClip clip in clips)
|
||||||
|
{
|
||||||
|
audioClips[clip.name] = clip;
|
||||||
|
}
|
||||||
|
|
||||||
|
Debug.Log($"총 {audioClips.Count}개의 오디오클립이 로드됨.");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public AudioClip GetAudioClip(string clipName)
|
||||||
|
{
|
||||||
|
if (audioClips.TryGetValue(clipName, out AudioClip clip))
|
||||||
|
{
|
||||||
|
return clip;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Debug.LogError($"패널 '{clipName}'을 찾을 수 없습니다.");
|
||||||
|
}
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 시작 시 BGM을 자동으로 재생
|
// 시작 시 BGM을 자동으로 재생
|
||||||
@ -39,12 +57,15 @@ public class AudioManager : Singleton<AudioManager>
|
|||||||
{
|
{
|
||||||
isPlayBGM = UserManager.IsPlayBGM;
|
isPlayBGM = UserManager.IsPlayBGM;
|
||||||
isPlaySFX = UserManager.IsPlaySFX;
|
isPlaySFX = UserManager.IsPlaySFX;
|
||||||
|
|
||||||
PlayBGM();
|
PlayBGM();
|
||||||
}
|
}
|
||||||
|
|
||||||
// 메인 BGM을 재생하는 함수
|
// 메인 BGM을 재생하는 함수
|
||||||
public void PlayMainBGM()
|
public void PlayMainBGM()
|
||||||
{
|
{
|
||||||
|
mainBgm = GetAudioClip("main bgm");
|
||||||
|
|
||||||
if (bgmAudioSource != null && mainBgm != null && !bgmAudioSource.isPlaying)
|
if (bgmAudioSource != null && mainBgm != null && !bgmAudioSource.isPlaying)
|
||||||
{
|
{
|
||||||
bgmAudioSource.clip = mainBgm;
|
bgmAudioSource.clip = mainBgm;
|
||||||
@ -56,6 +77,8 @@ public class AudioManager : Singleton<AudioManager>
|
|||||||
|
|
||||||
public void PlayGameBGM()
|
public void PlayGameBGM()
|
||||||
{
|
{
|
||||||
|
gameBgm = GetAudioClip("Game bgm2");
|
||||||
|
|
||||||
if (bgmAudioSource != null && gameBgm != null && !bgmAudioSource.isPlaying)
|
if (bgmAudioSource != null && gameBgm != null && !bgmAudioSource.isPlaying)
|
||||||
{
|
{
|
||||||
bgmAudioSource.clip = gameBgm;
|
bgmAudioSource.clip = gameBgm;
|
||||||
@ -101,10 +124,9 @@ public class AudioManager : Singleton<AudioManager>
|
|||||||
// 클릭 사운드(SFX) 재생
|
// 클릭 사운드(SFX) 재생
|
||||||
public void PlayClickSound()
|
public void PlayClickSound()
|
||||||
{
|
{
|
||||||
|
|
||||||
if (isPlaySFX && sfxAudioSource != null)
|
if (isPlaySFX && sfxAudioSource != null)
|
||||||
{
|
{
|
||||||
sfxAudioSource.PlayOneShot(clickSound, sfxVolume);
|
sfxAudioSource.PlayOneShot(GetAudioClip("Click Sound"), sfxVolume);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -113,7 +135,7 @@ public class AudioManager : Singleton<AudioManager>
|
|||||||
{
|
{
|
||||||
if (isPlaySFX && sfxAudioSource != null)
|
if (isPlaySFX && sfxAudioSource != null)
|
||||||
{
|
{
|
||||||
sfxAudioSource.PlayOneShot(closeSound, sfxVolume);
|
sfxAudioSource.PlayOneShot(GetAudioClip("Close Sound"), sfxVolume);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -121,7 +143,7 @@ public class AudioManager : Singleton<AudioManager>
|
|||||||
{
|
{
|
||||||
if (isPlaySFX && sfxAudioSource!=null)
|
if (isPlaySFX && sfxAudioSource!=null)
|
||||||
{
|
{
|
||||||
sfxAudioSource.PlayOneShot(coinsAddSound, sfxVolume);
|
sfxAudioSource.PlayOneShot(GetAudioClip("Coins ADD Sound"), sfxVolume);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -129,7 +151,7 @@ public class AudioManager : Singleton<AudioManager>
|
|||||||
{
|
{
|
||||||
if (isPlaySFX && sfxAudioSource!=null)
|
if (isPlaySFX && sfxAudioSource!=null)
|
||||||
{
|
{
|
||||||
sfxAudioSource.PlayOneShot(coinsEmptySound, sfxVolume);
|
sfxAudioSource.PlayOneShot(GetAudioClip("Coins Empty Sound"), sfxVolume);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -137,7 +159,7 @@ public class AudioManager : Singleton<AudioManager>
|
|||||||
{
|
{
|
||||||
if (isPlaySFX && sfxAudioSource!=null)
|
if (isPlaySFX && sfxAudioSource!=null)
|
||||||
{
|
{
|
||||||
sfxAudioSource.PlayOneShot(coinsRemoveSound, sfxVolume);
|
sfxAudioSource.PlayOneShot(GetAudioClip("Coins Remove Sound"), sfxVolume);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -145,7 +167,7 @@ public class AudioManager : Singleton<AudioManager>
|
|||||||
{
|
{
|
||||||
if (isPlaySFX && sfxAudioSource!=null)
|
if (isPlaySFX && sfxAudioSource!=null)
|
||||||
{
|
{
|
||||||
sfxAudioSource.PlayOneShot(loseSound, sfxVolume);
|
sfxAudioSource.PlayOneShot(GetAudioClip("lose sound"), sfxVolume);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -153,7 +175,7 @@ public class AudioManager : Singleton<AudioManager>
|
|||||||
{
|
{
|
||||||
if (isPlaySFX && sfxAudioSource!=null)
|
if (isPlaySFX && sfxAudioSource!=null)
|
||||||
{
|
{
|
||||||
sfxAudioSource.PlayOneShot(winSound, sfxVolume);
|
sfxAudioSource.PlayOneShot(GetAudioClip("win sound"), sfxVolume);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -161,7 +183,7 @@ public class AudioManager : Singleton<AudioManager>
|
|||||||
{
|
{
|
||||||
if (isPlaySFX && sfxAudioSource!=null)
|
if (isPlaySFX && sfxAudioSource!=null)
|
||||||
{
|
{
|
||||||
sfxAudioSource.PlayOneShot(stoneSound, sfxVolume);
|
sfxAudioSource.PlayOneShot(GetAudioClip("stone sound3"), sfxVolume);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -53,7 +53,7 @@ public class CoinsPanelController : MonoBehaviour
|
|||||||
_coinsRect.sizeDelta = new Vector2(100 + textLength * 30f, 100f);
|
_coinsRect.sizeDelta = new Vector2(100 + textLength * 30f, 100f);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ChangeTextAnimation(bool isAdd, Action action)
|
private void ChangeTextAnimation(int coinAdd, bool isAdd, Action action)
|
||||||
{
|
{
|
||||||
float duration = 0.2f;
|
float duration = 0.2f;
|
||||||
float yPos = 40f;
|
float yPos = 40f;
|
||||||
@ -64,8 +64,8 @@ public class CoinsPanelController : MonoBehaviour
|
|||||||
if (isAdd)
|
if (isAdd)
|
||||||
{
|
{
|
||||||
var currentHeartCount = coinsCountText.text;
|
var currentHeartCount = coinsCountText.text;
|
||||||
coinsCountText.text = (int.Parse(currentHeartCount) + 500).ToString();
|
coinsCountText.text = (int.Parse(currentHeartCount) + coinAdd).ToString();
|
||||||
// 코인 텍스트 100씩 증가
|
// 코인 텍스트 증가
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -98,14 +98,11 @@ public class CoinsPanelController : MonoBehaviour
|
|||||||
_canvasGroup.blocksRaycasts = false; //코인 중복 추가 방지 코드
|
_canvasGroup.blocksRaycasts = false; //코인 중복 추가 방지 코드
|
||||||
|
|
||||||
Sequence sequence = DOTween.Sequence();
|
Sequence sequence = DOTween.Sequence();
|
||||||
// i += a 반복 횟수 조절, 100개 단위로 상승 차감 시 100으로 설정
|
|
||||||
for (int i = 0; i < coinsCount; i+=500)
|
|
||||||
{
|
|
||||||
sequence.AppendCallback(() =>
|
sequence.AppendCallback(() =>
|
||||||
{
|
{
|
||||||
ChangeTextAnimation(true, ()=>
|
ChangeTextAnimation(coinsCount,true, ()=>
|
||||||
{
|
{
|
||||||
_coinsCount += 500;
|
_coinsCount += coinsCount;
|
||||||
action?.Invoke();
|
action?.Invoke();
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -113,7 +110,7 @@ public class CoinsPanelController : MonoBehaviour
|
|||||||
AudioManager.Instance.PlayCoinsAddSound();
|
AudioManager.Instance.PlayCoinsAddSound();
|
||||||
});
|
});
|
||||||
sequence.AppendInterval(0.5f);
|
sequence.AppendInterval(0.5f);
|
||||||
}
|
|
||||||
sequence.OnComplete(() =>
|
sequence.OnComplete(() =>
|
||||||
{
|
{
|
||||||
_canvasGroup.blocksRaycasts = true; //구매 후 클릭 활성화
|
_canvasGroup.blocksRaycasts = true; //구매 후 클릭 활성화
|
||||||
@ -152,7 +149,7 @@ public class CoinsPanelController : MonoBehaviour
|
|||||||
|
|
||||||
coinsRemoveImageObject.transform.DOScale(3f, 1f);
|
coinsRemoveImageObject.transform.DOScale(3f, 1f);
|
||||||
coinsRemoveImageObject.GetComponent<Image>().DOFade(0f, 1f)
|
coinsRemoveImageObject.GetComponent<Image>().DOFade(0f, 1f)
|
||||||
.OnComplete( ()=>ChangeTextAnimation(false, ()=>
|
.OnComplete( ()=>ChangeTextAnimation(0,false, ()=>
|
||||||
{
|
{
|
||||||
//감소된 코인 적용
|
//감소된 코인 적용
|
||||||
_coinsCount -= 100;
|
_coinsCount -= 100;
|
||||||
|
@ -16,6 +16,15 @@
|
|||||||
StartGame, // 생성한 방에 다른 유저가 참여해서 게임 시작
|
StartGame, // 생성한 방에 다른 유저가 참여해서 게임 시작
|
||||||
SwitchAI, // 15초 후 매칭 실패 시 AI 플레이로 전환 알림
|
SwitchAI, // 15초 후 매칭 실패 시 AI 플레이로 전환 알림
|
||||||
ExitRoom, // 자신이 방을 빠져 나왔을 때
|
ExitRoom, // 자신이 방을 빠져 나왔을 때
|
||||||
EndGame // 상대방이 접속을 끊거나 방을 나갔을 때
|
EndGame, // 상대방이 접속을 끊거나 방을 나갔을 때
|
||||||
|
DoSurrender, // 상대방이 항복했을 때
|
||||||
|
SurrenderConfirmed, // 항복 요청이 성공적으로 전송되었을 때
|
||||||
|
ReceiveDrawRequest,
|
||||||
|
DrawRequestSent,
|
||||||
|
DrawAccepted,
|
||||||
|
DrawConfirmed,
|
||||||
|
DrawRejected,
|
||||||
|
DrawRejectionConfirmed,
|
||||||
|
ReceiveTimeout // 상대방이 타임 아웃일 때
|
||||||
};
|
};
|
||||||
}
|
}
|
@ -20,7 +20,6 @@ public abstract class BasePlayerState
|
|||||||
public void ProcessMove(GameLogic gameLogic, Enums.PlayerType playerType, int row, int col)
|
public void ProcessMove(GameLogic gameLogic, Enums.PlayerType playerType, int row, int col)
|
||||||
{
|
{
|
||||||
gameLogic.fioTimer.PauseTimer();
|
gameLogic.fioTimer.PauseTimer();
|
||||||
|
|
||||||
gameLogic.SetNewBoardValue(playerType, row, col);
|
gameLogic.SetNewBoardValue(playerType, row, col);
|
||||||
gameLogic.CountStoneCounter();
|
gameLogic.CountStoneCounter();
|
||||||
|
|
||||||
@ -32,6 +31,13 @@ public abstract class BasePlayerState
|
|||||||
if (gameLogic.CheckGameWin(playerType, row, col))
|
if (gameLogic.CheckGameWin(playerType, row, col))
|
||||||
{
|
{
|
||||||
var gameResult = playerType == Enums.PlayerType.PlayerA? Enums.GameResult.Win:Enums.GameResult.Lose;
|
var gameResult = playerType == Enums.PlayerType.PlayerA? Enums.GameResult.Win:Enums.GameResult.Lose;
|
||||||
|
if (gameLogic.gameType == Enums.GameType.MultiPlay)
|
||||||
|
{
|
||||||
|
if (gameLogic.firstPlayerState.GetType() != typeof(PlayerState))
|
||||||
|
{
|
||||||
|
gameResult = gameResult == Enums.GameResult.Win ? Enums.GameResult.Lose : Enums.GameResult.Win;
|
||||||
|
}
|
||||||
|
}
|
||||||
GameManager.Instance.panelManager.OpenEffectPanel(gameResult);
|
GameManager.Instance.panelManager.OpenEffectPanel(gameResult);
|
||||||
gameLogic.EndGame(gameResult);
|
gameLogic.EndGame(gameResult);
|
||||||
}
|
}
|
||||||
@ -171,7 +177,7 @@ public class MultiPlayerState: BasePlayerState
|
|||||||
gameLogic.UpdateForbiddenMoves();
|
gameLogic.UpdateForbiddenMoves();
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
// gameLogic.currentTurn = _playerType;
|
gameLogic.currentTurn = _playerType;
|
||||||
// gameLogic.stoneController.OnStoneClickedDelegate = (row, col) =>
|
// gameLogic.stoneController.OnStoneClickedDelegate = (row, col) =>
|
||||||
// {
|
// {
|
||||||
// HandleMove(gameLogic, row, col);
|
// HandleMove(gameLogic, row, col);
|
||||||
@ -211,7 +217,7 @@ public class MultiPlayerState: BasePlayerState
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class GameLogic : MonoBehaviour
|
public class GameLogic : IDisposable
|
||||||
{
|
{
|
||||||
private Enums.PlayerType[,] _board;
|
private Enums.PlayerType[,] _board;
|
||||||
public StoneController stoneController;
|
public StoneController stoneController;
|
||||||
@ -220,6 +226,12 @@ public class GameLogic : MonoBehaviour
|
|||||||
//총 착수된 돌 카운터
|
//총 착수된 돌 카운터
|
||||||
public int _totalStoneCounter;
|
public int _totalStoneCounter;
|
||||||
public int TotalStoneCounter{get{return _totalStoneCounter;}}
|
public int TotalStoneCounter{get{return _totalStoneCounter;}}
|
||||||
|
//무승부 요청 가능 여부
|
||||||
|
private bool _requestDrawChance;
|
||||||
|
public bool RequestDrawChance{
|
||||||
|
get { return _requestDrawChance;}
|
||||||
|
set { _requestDrawChance = value;}
|
||||||
|
}
|
||||||
|
|
||||||
public BasePlayerState firstPlayerState;
|
public BasePlayerState firstPlayerState;
|
||||||
public BasePlayerState secondPlayerState;
|
public BasePlayerState secondPlayerState;
|
||||||
@ -235,9 +247,10 @@ public class GameLogic : MonoBehaviour
|
|||||||
private int _lastRow;
|
private int _lastRow;
|
||||||
private int _lastCol;
|
private int _lastCol;
|
||||||
|
|
||||||
private MultiplayManager _multiplayManager;
|
public MultiplayManager _multiplayManager;
|
||||||
private string _roomId;
|
private string _roomId;
|
||||||
|
|
||||||
|
|
||||||
#region Renju Members
|
#region Renju Members
|
||||||
// 렌주룰 금수 검사기
|
// 렌주룰 금수 검사기
|
||||||
private RenjuForbiddenMoveDetector _forbiddenDetector;
|
private RenjuForbiddenMoveDetector _forbiddenDetector;
|
||||||
@ -253,6 +266,7 @@ public class GameLogic : MonoBehaviour
|
|||||||
this.stoneController = stoneController;
|
this.stoneController = stoneController;
|
||||||
this.gameType = gameType;
|
this.gameType = gameType;
|
||||||
_totalStoneCounter = 0;
|
_totalStoneCounter = 0;
|
||||||
|
RequestDrawChance = true;
|
||||||
|
|
||||||
selectedRow = -1;
|
selectedRow = -1;
|
||||||
selectedCol = -1;
|
selectedCol = -1;
|
||||||
@ -272,17 +286,24 @@ public class GameLogic : MonoBehaviour
|
|||||||
//timer 시간초과시 진행 함수
|
//timer 시간초과시 진행 함수
|
||||||
this.fioTimer.OnTimeout = () =>
|
this.fioTimer.OnTimeout = () =>
|
||||||
{
|
{
|
||||||
if (currentTurn == Enums.PlayerType.PlayerA)
|
// 현재 턴의 플레이어가 로컬(유저)인지 확인
|
||||||
|
bool isCurrentPlayerLocal = (currentTurn == Enums.PlayerType.PlayerA && firstPlayerState is PlayerState) ||
|
||||||
|
(currentTurn == Enums.PlayerType.PlayerB && secondPlayerState is PlayerState);
|
||||||
|
|
||||||
|
if (isCurrentPlayerLocal) // 내가 타임 오버일 때
|
||||||
{
|
{
|
||||||
GameManager.Instance.panelManager.OpenConfirmPanel($"Game Over: {Enums.PlayerType.PlayerB} Win",
|
if (this.gameType == Enums.GameType.MultiPlay) // 멀티플레이인 경우
|
||||||
() =>{});
|
{
|
||||||
|
_multiplayManager?.SendTimeout();
|
||||||
|
}
|
||||||
|
GameManager.Instance.panelManager.OpenEffectPanel(Enums.GameResult.Lose);
|
||||||
EndGame(Enums.GameResult.Lose);
|
EndGame(Enums.GameResult.Lose);
|
||||||
}
|
}
|
||||||
else if (currentTurn == Enums.PlayerType.PlayerB)
|
else // 로컬에서 자신의 타이머 기준으로 상대방이 타임 오버일 때
|
||||||
{
|
{
|
||||||
GameManager.Instance.panelManager.OpenConfirmPanel($"Game Over: {Enums.PlayerType.PlayerA} Win",
|
// TODO: 컨펌 패널 OK 버튼 삭제?
|
||||||
|
GameManager.Instance.panelManager.OpenConfirmPanel("상대방의 응답을 기다리는 중입니다",
|
||||||
() => { } );
|
() => { } );
|
||||||
EndGame(Enums.GameResult.Win);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@ -341,15 +362,6 @@ public class GameLogic : MonoBehaviour
|
|||||||
Debug.Log("해당 플레이어가 선공 입니다");
|
Debug.Log("해당 플레이어가 선공 입니다");
|
||||||
firstPlayerState = new PlayerState(true, _multiplayManager, joinRoomData.roomId);
|
firstPlayerState = new PlayerState(true, _multiplayManager, joinRoomData.roomId);
|
||||||
secondPlayerState = new MultiPlayerState(false, _multiplayManager);
|
secondPlayerState = new MultiPlayerState(false, _multiplayManager);
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Debug.Log("해당 플레이어가 후공 입니다");
|
|
||||||
firstPlayerState = new MultiPlayerState(true, _multiplayManager);
|
|
||||||
secondPlayerState = new PlayerState(false, _multiplayManager, joinRoomData.roomId);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 메인 스레드에서 실행 - UI 업데이트는 메인 스레드에서 실행 필요
|
|
||||||
UnityMainThreadDispatcher.Instance().Enqueue(() =>
|
UnityMainThreadDispatcher.Instance().Enqueue(() =>
|
||||||
{
|
{
|
||||||
GameManager.Instance.InitPlayersName(UserManager.Instance.Nickname, joinRoomData.opponentNickname);
|
GameManager.Instance.InitPlayersName(UserManager.Instance.Nickname, joinRoomData.opponentNickname);
|
||||||
@ -357,7 +369,27 @@ public class GameLogic : MonoBehaviour
|
|||||||
|
|
||||||
// 리플레이 데이터 업데이트
|
// 리플레이 데이터 업데이트
|
||||||
ReplayManager.Instance.InitReplayData(UserManager.Instance.Nickname, joinRoomData.opponentNickname, UserManager.Instance.imageIndex, joinRoomData.opponentImageIndex);
|
ReplayManager.Instance.InitReplayData(UserManager.Instance.Nickname, joinRoomData.opponentNickname, UserManager.Instance.imageIndex, joinRoomData.opponentImageIndex);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Debug.Log("해당 플레이어가 후공 입니다");
|
||||||
|
firstPlayerState = new MultiPlayerState(true, _multiplayManager);
|
||||||
|
secondPlayerState = new PlayerState(false, _multiplayManager, joinRoomData.roomId);
|
||||||
|
|
||||||
|
UnityMainThreadDispatcher.Instance().Enqueue(() =>
|
||||||
|
{
|
||||||
|
GameManager.Instance.InitPlayersName(joinRoomData.opponentNickname, UserManager.Instance.Nickname);
|
||||||
|
GameManager.Instance.InitProfileImages(joinRoomData.opponentImageIndex, UserManager.Instance.imageIndex);
|
||||||
|
|
||||||
|
// 리플레이 데이터 업데이트
|
||||||
|
ReplayManager.Instance.InitReplayData(joinRoomData.opponentNickname, UserManager.Instance.Nickname, joinRoomData.opponentImageIndex, UserManager.Instance.imageIndex);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 메인 스레드에서 실행 - UI 업데이트는 메인 스레드에서 실행 필요
|
||||||
|
UnityMainThreadDispatcher.Instance().Enqueue(() =>
|
||||||
|
{
|
||||||
// 로딩 패널 열려있으면 닫기
|
// 로딩 패널 열려있으면 닫기
|
||||||
GameManager.Instance.panelManager.CloseLoadingPanel();
|
GameManager.Instance.panelManager.CloseLoadingPanel();
|
||||||
|
|
||||||
@ -387,15 +419,6 @@ public class GameLogic : MonoBehaviour
|
|||||||
Debug.Log("해당 플레이어가 선공 입니다");
|
Debug.Log("해당 플레이어가 선공 입니다");
|
||||||
firstPlayerState = new PlayerState(true, _multiplayManager, _roomId);
|
firstPlayerState = new PlayerState(true, _multiplayManager, _roomId);
|
||||||
secondPlayerState = new MultiPlayerState(false, _multiplayManager);
|
secondPlayerState = new MultiPlayerState(false, _multiplayManager);
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Debug.Log("해당 플레이어가 후공 입니다");
|
|
||||||
firstPlayerState = new MultiPlayerState(true, _multiplayManager);
|
|
||||||
secondPlayerState = new PlayerState(false, _multiplayManager, _roomId);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 메인 스레드에서 실행 - UI 업데이트는 메인 스레드에서 실행 필요
|
|
||||||
UnityMainThreadDispatcher.Instance().Enqueue(() =>
|
UnityMainThreadDispatcher.Instance().Enqueue(() =>
|
||||||
{
|
{
|
||||||
GameManager.Instance.InitPlayersName(UserManager.Instance.Nickname, startGameData.opponentNickname);
|
GameManager.Instance.InitPlayersName(UserManager.Instance.Nickname, startGameData.opponentNickname);
|
||||||
@ -403,7 +426,26 @@ public class GameLogic : MonoBehaviour
|
|||||||
|
|
||||||
// 리플레이 데이터 업데이트
|
// 리플레이 데이터 업데이트
|
||||||
ReplayManager.Instance.InitReplayData(UserManager.Instance.Nickname, startGameData.opponentNickname, UserManager.Instance.imageIndex, startGameData.opponentImageIndex);
|
ReplayManager.Instance.InitReplayData(UserManager.Instance.Nickname, startGameData.opponentNickname, UserManager.Instance.imageIndex, startGameData.opponentImageIndex);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Debug.Log("해당 플레이어가 후공 입니다");
|
||||||
|
firstPlayerState = new MultiPlayerState(true, _multiplayManager);
|
||||||
|
secondPlayerState = new PlayerState(false, _multiplayManager, _roomId);
|
||||||
|
UnityMainThreadDispatcher.Instance().Enqueue(() =>
|
||||||
|
{
|
||||||
|
GameManager.Instance.InitPlayersName(startGameData.opponentNickname, UserManager.Instance.Nickname);
|
||||||
|
GameManager.Instance.InitProfileImages(startGameData.opponentImageIndex, UserManager.Instance.imageIndex);
|
||||||
|
|
||||||
|
// 리플레이 데이터 업데이트
|
||||||
|
ReplayManager.Instance.InitReplayData(startGameData.opponentNickname, UserManager.Instance.Nickname, startGameData.opponentImageIndex, UserManager.Instance.imageIndex);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 메인 스레드에서 실행 - UI 업데이트는 메인 스레드에서 실행 필요
|
||||||
|
UnityMainThreadDispatcher.Instance().Enqueue(() =>
|
||||||
|
{
|
||||||
// 로딩 패널 열려있으면 닫기
|
// 로딩 패널 열려있으면 닫기
|
||||||
GameManager.Instance.panelManager.CloseLoadingPanel();
|
GameManager.Instance.panelManager.CloseLoadingPanel();
|
||||||
|
|
||||||
@ -419,6 +461,70 @@ public class GameLogic : MonoBehaviour
|
|||||||
Debug.Log("## End Game");
|
Debug.Log("## End Game");
|
||||||
// TODO: End Room 처리
|
// TODO: End Room 처리
|
||||||
break;
|
break;
|
||||||
|
case Constants.MultiplayManagerState.DoSurrender:
|
||||||
|
Debug.Log("상대방의 항복 요청 들어옴");
|
||||||
|
UnityMainThreadDispatcher.Instance().Enqueue(() =>
|
||||||
|
{
|
||||||
|
GameManager.Instance.panelManager.OpenEffectPanel(Enums.GameResult.Win);
|
||||||
|
EndGame(Enums.GameResult.Win);
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case Constants.MultiplayManagerState.SurrenderConfirmed:
|
||||||
|
Debug.Log("항복 요청 전송 완료");
|
||||||
|
UnityMainThreadDispatcher.Instance().Enqueue(() =>
|
||||||
|
{
|
||||||
|
GameManager.Instance.panelManager.OpenEffectPanel(Enums.GameResult.Lose);
|
||||||
|
EndGame(Enums.GameResult.Lose);
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case Constants.MultiplayManagerState.ReceiveDrawRequest:
|
||||||
|
Debug.Log("상대방의 무승부 요청 들어옴");
|
||||||
|
UnityMainThreadDispatcher.Instance().Enqueue(() =>
|
||||||
|
{
|
||||||
|
GameManager.Instance.panelManager.OpenDrawConfirmPanel("무승부 요청을 승락하시겠습니까?", () =>
|
||||||
|
{
|
||||||
|
GameManager.Instance.panelManager.OpenEffectPanel(Enums.GameResult.Draw);
|
||||||
|
EndGame(Enums.GameResult.Draw);
|
||||||
|
_multiplayManager.AcceptDraw();
|
||||||
|
}, () =>
|
||||||
|
{
|
||||||
|
_multiplayManager.RejectDraw();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case Constants.MultiplayManagerState.DrawRequestSent:
|
||||||
|
Debug.Log("무승부 요청 전송 완료");
|
||||||
|
break;
|
||||||
|
case Constants.MultiplayManagerState.DrawAccepted:
|
||||||
|
Debug.Log("무승부 요청이 승락이 들어옴");
|
||||||
|
UnityMainThreadDispatcher.Instance().Enqueue(() =>
|
||||||
|
{
|
||||||
|
GameManager.Instance.panelManager.OpenEffectPanel(Enums.GameResult.Draw);
|
||||||
|
EndGame(Enums.GameResult.Draw);
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case Constants.MultiplayManagerState.DrawConfirmed:
|
||||||
|
Debug.Log("무승부 요청 승락 완료");
|
||||||
|
break;
|
||||||
|
case Constants.MultiplayManagerState.DrawRejected:
|
||||||
|
Debug.Log("무승부 요청이 거부가 들어옴");
|
||||||
|
UnityMainThreadDispatcher.Instance().Enqueue(() =>
|
||||||
|
{
|
||||||
|
GameManager.Instance.panelManager.OpenConfirmPanel("무승부 요청을 거부하였습니다.", () => { });
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case Constants.MultiplayManagerState.DrawRejectionConfirmed:
|
||||||
|
Debug.Log("무승부 요청 거부 완료");
|
||||||
|
|
||||||
|
break;
|
||||||
|
case Constants.MultiplayManagerState.ReceiveTimeout:
|
||||||
|
Debug.Log("상대방이 타임 아웃 됨");
|
||||||
|
UnityMainThreadDispatcher.Instance().Enqueue(() =>
|
||||||
|
{
|
||||||
|
GameManager.Instance.panelManager.OpenEffectPanel(Enums.GameResult.Win);
|
||||||
|
EndGame(Enums.GameResult.Win);
|
||||||
|
});
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
ReplayManager.Instance.InitReplayData(UserManager.Instance.Nickname,"nicknameB");
|
ReplayManager.Instance.InitReplayData(UserManager.Instance.Nickname,"nicknameB");
|
||||||
|
|
||||||
@ -441,7 +547,6 @@ public class GameLogic : MonoBehaviour
|
|||||||
return AI_NAMIES[index];
|
return AI_NAMIES[index];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void SwitchToSinglePlayer()
|
public void SwitchToSinglePlayer()
|
||||||
{
|
{
|
||||||
_multiplayManager?.Dispose();
|
_multiplayManager?.Dispose();
|
||||||
|
@ -20,12 +20,21 @@ public class GameManager : Singleton<GameManager>
|
|||||||
[NonSerialized] public PanelManager panelManager;
|
[NonSerialized] public PanelManager panelManager;
|
||||||
[NonSerialized] public AudioManager audioManager;
|
[NonSerialized] public AudioManager audioManager;
|
||||||
|
|
||||||
|
private MultiplayManager _multiplayManager;
|
||||||
|
|
||||||
protected override void Awake()
|
protected override void Awake()
|
||||||
{
|
{
|
||||||
base.Awake();
|
base.Awake();
|
||||||
InitPanels();
|
InitPanels();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public MultiplayManager GetMultiplayManager()
|
||||||
|
{
|
||||||
|
_multiplayManager = _gameLogic._multiplayManager;
|
||||||
|
if (_multiplayManager == null) Debug.Log("MultiplayManager가 null입니다");
|
||||||
|
return _multiplayManager;
|
||||||
|
}
|
||||||
|
|
||||||
private void InitPanels()
|
private void InitPanels()
|
||||||
{
|
{
|
||||||
if (panelManager == null)
|
if (panelManager == null)
|
||||||
@ -81,13 +90,13 @@ public class GameManager : Singleton<GameManager>
|
|||||||
_camera = GameObject.FindObjectOfType<Camera>().gameObject;
|
_camera = GameObject.FindObjectOfType<Camera>().gameObject;
|
||||||
_gameUIController = GameObject.FindObjectOfType<GameUIController>();
|
_gameUIController = GameObject.FindObjectOfType<GameUIController>();
|
||||||
_gameLogic = new GameLogic(_stoneController, _gameType, fioTimer);
|
_gameLogic = new GameLogic(_stoneController, _gameType, fioTimer);
|
||||||
|
|
||||||
}
|
}
|
||||||
InitPanels();
|
InitPanels();
|
||||||
}
|
}
|
||||||
//임시 재시작 재대결
|
//임시 재시작 재대결
|
||||||
public void RetryGame()
|
public void RetryGame()
|
||||||
{
|
{
|
||||||
|
if (_gameLogic == null) return;
|
||||||
_gameLogic.ResetBoard();
|
_gameLogic.ResetBoard();
|
||||||
_stoneController.InitStones();
|
_stoneController.InitStones();
|
||||||
_gameLogic.SetState(_gameLogic.firstPlayerState);
|
_gameLogic.SetState(_gameLogic.firstPlayerState);
|
||||||
@ -110,4 +119,16 @@ public class GameManager : Singleton<GameManager>
|
|||||||
if (_gameUIController == null) return;
|
if (_gameUIController == null) return;
|
||||||
_gameUIController.SetTurnIndicator(isFirstPlayer);
|
_gameUIController.SetTurnIndicator(isFirstPlayer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool GetRequestDrawChance()
|
||||||
|
{
|
||||||
|
if (_gameLogic == null){ return false;}
|
||||||
|
return _gameLogic.RequestDrawChance;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetRequestDrawChanceFalse()
|
||||||
|
{
|
||||||
|
if (_gameLogic == null) return;
|
||||||
|
_gameLogic.RequestDrawChance = false;
|
||||||
|
}
|
||||||
}
|
}
|
@ -67,6 +67,8 @@ public class MultiplayManager : IDisposable
|
|||||||
private event Action<Constants.MultiplayManagerState, object> _onMultiplayStateChanged;
|
private event Action<Constants.MultiplayManagerState, object> _onMultiplayStateChanged;
|
||||||
public Action<MoveData> OnOpponentMove;
|
public Action<MoveData> OnOpponentMove;
|
||||||
|
|
||||||
|
private string _roomId;
|
||||||
|
|
||||||
public MultiplayManager(Action<Constants.MultiplayManagerState, object> onMultiplayStateChanged)
|
public MultiplayManager(Action<Constants.MultiplayManagerState, object> onMultiplayStateChanged)
|
||||||
{
|
{
|
||||||
_onMultiplayStateChanged = onMultiplayStateChanged;
|
_onMultiplayStateChanged = onMultiplayStateChanged;
|
||||||
@ -86,6 +88,15 @@ public class MultiplayManager : IDisposable
|
|||||||
_socket.On("exitRoom", ExitRoom);
|
_socket.On("exitRoom", ExitRoom);
|
||||||
_socket.On("endGame", EndGame);
|
_socket.On("endGame", EndGame);
|
||||||
_socket.On("doOpponent", DoOpponent);
|
_socket.On("doOpponent", DoOpponent);
|
||||||
|
_socket.On("doSurrender", DoSurrender);
|
||||||
|
_socket.On("surrenderConfirmed", SurrenderConfirmed);
|
||||||
|
_socket.On("receiveTimeout", ReceiveTimeout);
|
||||||
|
_socket.On("receiveDrawRequest", ReceiveDrawRequest);
|
||||||
|
_socket.On("drawRequestSent", DrawRequestSent);
|
||||||
|
_socket.On("drawAccepted", DrawAccepted);
|
||||||
|
_socket.On("drawConfirmed", DrawConfirmed);
|
||||||
|
_socket.On("drawRejected", DrawRejected);
|
||||||
|
_socket.On("drawRejectionConfirmed", DrawRejectionConfirmed);
|
||||||
|
|
||||||
_socket.Connect();
|
_socket.Connect();
|
||||||
}
|
}
|
||||||
@ -109,6 +120,7 @@ public class MultiplayManager : IDisposable
|
|||||||
private void CreateRoom(SocketIOResponse response)
|
private void CreateRoom(SocketIOResponse response)
|
||||||
{
|
{
|
||||||
var data = response.GetValue<CreateRoomData>();
|
var data = response.GetValue<CreateRoomData>();
|
||||||
|
_roomId = data.roomId;
|
||||||
_onMultiplayStateChanged?.Invoke(Constants.MultiplayManagerState.CreateRoom, data.roomId);
|
_onMultiplayStateChanged?.Invoke(Constants.MultiplayManagerState.CreateRoom, data.roomId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -116,8 +128,7 @@ public class MultiplayManager : IDisposable
|
|||||||
{
|
{
|
||||||
var data = response.GetValue<JoinRoomData>();
|
var data = response.GetValue<JoinRoomData>();
|
||||||
Debug.Log($"룸에 참여: 룸 ID - {data.roomId}, 상대방 등급 - {data.opponentRating}, 상대방 이름 - {data.opponentNickname}, 흑/백 여부 - {data.isBlack}, 상대방 이미지 인덱스 - {data.opponentImageIndex}");
|
Debug.Log($"룸에 참여: 룸 ID - {data.roomId}, 상대방 등급 - {data.opponentRating}, 상대방 이름 - {data.opponentNickname}, 흑/백 여부 - {data.isBlack}, 상대방 이미지 인덱스 - {data.opponentImageIndex}");
|
||||||
|
_roomId = data.roomId;
|
||||||
// 필요한 데이터 사용
|
|
||||||
_onMultiplayStateChanged?.Invoke(Constants.MultiplayManagerState.JoinRoom, data);
|
_onMultiplayStateChanged?.Invoke(Constants.MultiplayManagerState.JoinRoom, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -180,7 +191,134 @@ public class MultiplayManager : IDisposable
|
|||||||
|
|
||||||
public void LeaveRoom(string roomId)
|
public void LeaveRoom(string roomId)
|
||||||
{
|
{
|
||||||
_socket.Emit("leaveRoom", new { roomId });
|
if (string.IsNullOrEmpty(_roomId))
|
||||||
|
{
|
||||||
|
Debug.LogError("LeaveRoom 호출 실패: _roomId가 설정되지 않음");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
_socket.Emit("leaveRoom", new { roomId = _roomId });
|
||||||
|
_roomId = null; // 방 나가면 roomId 초기화
|
||||||
|
}
|
||||||
|
|
||||||
|
public void RequestSurrender()
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(_roomId))
|
||||||
|
{
|
||||||
|
Debug.LogError("LeaveRoom 호출 실패: _roomId가 설정되지 않음");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
_socket.Emit("requestSurrender",new { roomId = _roomId });
|
||||||
|
}
|
||||||
|
|
||||||
|
private void DoSurrender(SocketIOResponse response)
|
||||||
|
{
|
||||||
|
var data = response.GetValue<MessageData>();
|
||||||
|
|
||||||
|
_onMultiplayStateChanged?.Invoke(Constants.MultiplayManagerState.DoSurrender, data.message);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void SurrenderConfirmed(SocketIOResponse response)
|
||||||
|
{
|
||||||
|
var data = response.GetValue<MessageData>();
|
||||||
|
|
||||||
|
_onMultiplayStateChanged?.Invoke(Constants.MultiplayManagerState.SurrenderConfirmed, data.message);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 타임 아웃 요청
|
||||||
|
/// </summary>
|
||||||
|
public void SendTimeout()
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(_roomId))
|
||||||
|
{
|
||||||
|
Debug.LogError("LeaveRoom 호출 실패: _roomId가 설정되지 않음");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
_socket.Emit("sendTimeout",new { roomId = _roomId });
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 타임 아웃 수신
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="response"></param>
|
||||||
|
private void ReceiveTimeout(SocketIOResponse response)
|
||||||
|
{
|
||||||
|
var data = response.GetValue<MessageData>();
|
||||||
|
|
||||||
|
_onMultiplayStateChanged?.Invoke(Constants.MultiplayManagerState.ReceiveTimeout, data.message);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void RequestDraw()
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(_roomId))
|
||||||
|
{
|
||||||
|
Debug.LogError("requestDraw 호출 실패: _roomId가 설정되지 않음");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
_socket.Emit("requestDraw",new { roomId = _roomId });
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ReceiveDrawRequest(SocketIOResponse response)
|
||||||
|
{
|
||||||
|
var data = response.GetValue<MessageData>();
|
||||||
|
|
||||||
|
_onMultiplayStateChanged?.Invoke(Constants.MultiplayManagerState.ReceiveDrawRequest, data.message);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void DrawRequestSent(SocketIOResponse response)
|
||||||
|
{
|
||||||
|
var data = response.GetValue<MessageData>();
|
||||||
|
|
||||||
|
_onMultiplayStateChanged?.Invoke(Constants.MultiplayManagerState.DrawRequestSent, data.message);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AcceptDraw()
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(_roomId))
|
||||||
|
{
|
||||||
|
Debug.LogError("acceptDraw 호출 실패: _roomId가 설정되지 않음");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
_socket.Emit("acceptDraw", new { roomId = _roomId });
|
||||||
|
}
|
||||||
|
|
||||||
|
private void DrawAccepted(SocketIOResponse response)
|
||||||
|
{
|
||||||
|
var data = response.GetValue<MessageData>();
|
||||||
|
|
||||||
|
_onMultiplayStateChanged?.Invoke(Constants.MultiplayManagerState.DrawAccepted, data.message);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void DrawConfirmed(SocketIOResponse response)
|
||||||
|
{
|
||||||
|
var data = response.GetValue<MessageData>();
|
||||||
|
|
||||||
|
_onMultiplayStateChanged?.Invoke(Constants.MultiplayManagerState.DrawConfirmed, data.message);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void RejectDraw()
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(_roomId))
|
||||||
|
{
|
||||||
|
Debug.LogError("rejectDraw 호출 실패: _roomId가 설정되지 않음");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
_socket.Emit("rejectDraw", new { roomId = _roomId });
|
||||||
|
}
|
||||||
|
|
||||||
|
private void DrawRejected(SocketIOResponse response)
|
||||||
|
{
|
||||||
|
var data = response.GetValue<MessageData>();
|
||||||
|
|
||||||
|
_onMultiplayStateChanged?.Invoke(Constants.MultiplayManagerState.DrawRejected, data.message);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void DrawRejectionConfirmed(SocketIOResponse response)
|
||||||
|
{
|
||||||
|
var data = response.GetValue<MessageData>();
|
||||||
|
|
||||||
|
_onMultiplayStateChanged?.Invoke(Constants.MultiplayManagerState.DrawRejectionConfirmed, data.message);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
|
@ -228,7 +228,12 @@ public class NetworkManager : Singleton<NetworkManager>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public IEnumerator GetLeaderboard(Action<Scores> success, Action failure)
|
public void GetLeaderboard(Action<List<ScoreInfo>> success, Action failure)
|
||||||
|
{
|
||||||
|
StartCoroutine(GetLeaderboardCoroutine(success, failure));
|
||||||
|
}
|
||||||
|
|
||||||
|
public IEnumerator GetLeaderboardCoroutine(Action<List<ScoreInfo>> success, Action failure)
|
||||||
{
|
{
|
||||||
using (UnityWebRequest www =
|
using (UnityWebRequest www =
|
||||||
new UnityWebRequest(Constants.ServerURL + "/leaderboard", UnityWebRequest.kHttpVerbGET))
|
new UnityWebRequest(Constants.ServerURL + "/leaderboard", UnityWebRequest.kHttpVerbGET))
|
||||||
@ -256,10 +261,15 @@ public class NetworkManager : Singleton<NetworkManager>
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var result = www.downloadHandler.text;
|
// 성공적으로 데이터를 받아온 경우
|
||||||
var scores = JsonUtility.FromJson<Scores>(result);
|
string jsonResponse = www.downloadHandler.text; // 응답으로 받은 JSON 데이터
|
||||||
|
|
||||||
success?.Invoke(scores);
|
// JSON을 ScoreInfo 리스트로 파싱
|
||||||
|
ScoreListWrapper wrapper = JsonUtility.FromJson<ScoreListWrapper>(jsonResponse);
|
||||||
|
List<ScoreInfo> leaderboardItems = wrapper.leaderboardDatas;
|
||||||
|
|
||||||
|
// Show 메서드를 통해 데이터를 표시
|
||||||
|
success?.Invoke(leaderboardItems);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -511,36 +521,4 @@ public class NetworkManager : Singleton<NetworkManager>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void GetLeaderboardData(Action<List<ScoreInfo>> success, Action failure)
|
|
||||||
{
|
|
||||||
StartCoroutine(GetLeaderboardDataCoroutine(success, failure));
|
|
||||||
}
|
|
||||||
|
|
||||||
private IEnumerator GetLeaderboardDataCoroutine(Action<List<ScoreInfo>> success, Action failure)
|
|
||||||
{
|
|
||||||
string url = Constants.ServerURL + "/leaderboard/"; // 서버의 리더보드 데이터 URL
|
|
||||||
|
|
||||||
UnityWebRequest www = UnityWebRequest.Get(url); // GET 요청으로 데이터 받기
|
|
||||||
yield return www.SendWebRequest(); // 요청 전송 대기
|
|
||||||
|
|
||||||
// 요청이 실패했을 때
|
|
||||||
if (www.result == UnityWebRequest.Result.ConnectionError || www.result == UnityWebRequest.Result.ProtocolError)
|
|
||||||
{
|
|
||||||
Debug.LogError("Error: " + www.error);
|
|
||||||
failure?.Invoke();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// 성공적으로 데이터를 받아온 경우
|
|
||||||
string jsonResponse = www.downloadHandler.text; // 응답으로 받은 JSON 데이터
|
|
||||||
|
|
||||||
// JSON을 ScoreInfo 리스트로 파싱
|
|
||||||
ScoreListWrapper wrapper = JsonUtility.FromJson<ScoreListWrapper>(jsonResponse);
|
|
||||||
List<ScoreInfo> leaderboardItems = wrapper.leaderboardDatas;
|
|
||||||
|
|
||||||
// Show 메서드를 통해 데이터를 표시
|
|
||||||
success?.Invoke(leaderboardItems);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
@ -27,6 +27,16 @@ public class WinEffectController : EffectController
|
|||||||
Invoke(nameof(PopupObject), 0.3f);
|
Invoke(nameof(PopupObject), 0.3f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override void ShowPanel()
|
||||||
|
{
|
||||||
|
CanvasGroup canvasGroup = gameObject.GetComponent<CanvasGroup>() ?? gameObject.AddComponent<CanvasGroup>();
|
||||||
|
|
||||||
|
canvasGroup.alpha = 0f;
|
||||||
|
canvasGroup.DOFade(1f, 1f);
|
||||||
|
bannerObj.transform.DOScale(Vector3.zero, 0f);
|
||||||
|
bannerObj.transform.DOScale(Vector3.one, 1f);
|
||||||
|
}
|
||||||
|
|
||||||
private void RotateHaloObject()
|
private void RotateHaloObject()
|
||||||
{
|
{
|
||||||
// 무한 회전 효과
|
// 무한 회전 효과
|
||||||
|
@ -19,7 +19,6 @@ public class SwitchController : MonoBehaviour
|
|||||||
|
|
||||||
private RectTransform _handleRectTransform;
|
private RectTransform _handleRectTransform;
|
||||||
private Image _backgroundImage;
|
private Image _backgroundImage;
|
||||||
private AudioSource _audioSource;
|
|
||||||
|
|
||||||
private bool _isOn;
|
private bool _isOn;
|
||||||
|
|
||||||
@ -27,7 +26,6 @@ public class SwitchController : MonoBehaviour
|
|||||||
{
|
{
|
||||||
_handleRectTransform = handleImage.GetComponent<RectTransform>();
|
_handleRectTransform = handleImage.GetComponent<RectTransform>();
|
||||||
_backgroundImage = GetComponent<Image>();
|
_backgroundImage = GetComponent<Image>();
|
||||||
_audioSource = GetComponent<AudioSource>();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Start()
|
private void Start()
|
||||||
@ -35,7 +33,15 @@ public class SwitchController : MonoBehaviour
|
|||||||
//초기 상태는 false
|
//초기 상태는 false
|
||||||
_handleRectTransform.anchoredPosition = new Vector2(-14, 0);
|
_handleRectTransform.anchoredPosition = new Vector2(-14, 0);
|
||||||
_backgroundImage.color = OffColor;
|
_backgroundImage.color = OffColor;
|
||||||
_isOn = false;
|
|
||||||
|
if (gameObject.name == "SFX Switch")
|
||||||
|
{
|
||||||
|
_isOn = UserManager.IsPlaySFX;
|
||||||
|
}
|
||||||
|
else if (gameObject.name == "BGM Switch")
|
||||||
|
{
|
||||||
|
_isOn = UserManager.IsPlayBGM;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//스위치 상태 변경 함수
|
//스위치 상태 변경 함수
|
||||||
|
@ -0,0 +1,39 @@
|
|||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using TMPro;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
public class DrawConfirmPanelController : PanelController
|
||||||
|
{
|
||||||
|
[SerializeField] private TMP_Text messageText; //자식 텍스트 변수
|
||||||
|
|
||||||
|
public delegate void OnConfirmButtonClick();
|
||||||
|
private OnConfirmButtonClick onConfirmButtonClick;
|
||||||
|
|
||||||
|
public delegate void OnContradictButtonClick();
|
||||||
|
private OnContradictButtonClick onContradictButtonClick;
|
||||||
|
|
||||||
|
public void Show(string message, OnConfirmButtonClick onConfirmButtonClick, OnContradictButtonClick onContradictButtonClick)
|
||||||
|
{
|
||||||
|
messageText.text = message;
|
||||||
|
this.onConfirmButtonClick = onConfirmButtonClick;
|
||||||
|
this.onContradictButtonClick = onContradictButtonClick;
|
||||||
|
base.Show();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Confirm 버튼 클릭시 호출되는 함수
|
||||||
|
/// </summary>
|
||||||
|
public void OnClickConfirmButton()
|
||||||
|
{
|
||||||
|
Hide(() => onConfirmButtonClick?.Invoke());
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// X 버튼 클릭시 호출되는 함수
|
||||||
|
/// </summary>
|
||||||
|
public void OnClickCloseButton()
|
||||||
|
{
|
||||||
|
Hide(() => onContradictButtonClick?.Invoke());
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 1ebb6563d04ba2b44b06891880cbe0b6
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
@ -27,7 +27,7 @@ public class LeaderBoardController : MonoBehaviour
|
|||||||
if (isLeaderboardLoaded) return; // 이미 리더보드가 로드되었으면 중복 호출 방지
|
if (isLeaderboardLoaded) return; // 이미 리더보드가 로드되었으면 중복 호출 방지
|
||||||
|
|
||||||
leaderboardPanel.SetActive(true);
|
leaderboardPanel.SetActive(true);
|
||||||
NetworkManager.Instance.GetLeaderboardData((leaderboardItems) =>
|
NetworkManager.Instance.GetLeaderboard((leaderboardItems) =>
|
||||||
{
|
{
|
||||||
Show(leaderboardItems);
|
Show(leaderboardItems);
|
||||||
}, () => { });
|
}, () => { });
|
||||||
|
@ -187,6 +187,18 @@ public class PanelManager : MonoBehaviour
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void OpenDrawConfirmPanel(string message,
|
||||||
|
DrawConfirmPanelController.OnConfirmButtonClick onConfirmButtonClick,
|
||||||
|
DrawConfirmPanelController.OnContradictButtonClick onContradictButtonClick)
|
||||||
|
{
|
||||||
|
if (_canvas != null)
|
||||||
|
{
|
||||||
|
var drawConfirmPanelObject = GetPanel("Draw Confirm Panel");
|
||||||
|
drawConfirmPanelObject.GetComponent<DrawConfirmPanelController>()
|
||||||
|
.Show(message, onConfirmButtonClick, onContradictButtonClick);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void OpenSettingsPanel()
|
public void OpenSettingsPanel()
|
||||||
{
|
{
|
||||||
if (_canvas != null)
|
if (_canvas != null)
|
||||||
@ -262,7 +274,7 @@ public class PanelManager : MonoBehaviour
|
|||||||
shopItems.Add(shopItem);
|
shopItems.Add(shopItem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
GameManager.Instance.panelManager.OpenShopPanel(shopItems);
|
OpenShopPanel(shopItems);
|
||||||
}
|
}
|
||||||
|
|
||||||
//승급 패널 생성
|
//승급 패널 생성
|
||||||
|
Loading…
x
Reference in New Issue
Block a user