From deea0a218eb16abb09959f93474358412575acec Mon Sep 17 00:00:00 2001 From: SherlockShiYL Date: Sun, 20 Mar 2022 20:22:40 -0700 Subject: [PATCH] Max amount of card remain, Max amount of cards in hand. --- Assets/Prefabs/UIDeck.prefab | 1074 ++++++++++++++++++++++++++-------- Assets/Scripts/Deck.cs | 146 +++-- 2 files changed, 913 insertions(+), 307 deletions(-) diff --git a/Assets/Prefabs/UIDeck.prefab b/Assets/Prefabs/UIDeck.prefab index e22b53c..c21b50c 100644 --- a/Assets/Prefabs/UIDeck.prefab +++ b/Assets/Prefabs/UIDeck.prefab @@ -167,7 +167,7 @@ RectTransform: m_Children: - {fileID: 2046541689} m_Father: {fileID: 6342785598281792429} - m_RootOrder: 4 + m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} @@ -940,7 +940,7 @@ GameObject: - component: {fileID: 1973886306} - component: {fileID: 4941518367652551659} m_Layer: 5 - m_Name: HandList + m_Name: HandListContent m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -957,10 +957,9 @@ RectTransform: m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 5277353724762008331} + m_Children: [] m_Father: {fileID: 6342785598281792429} - m_RootOrder: 3 + m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 1, y: 0} @@ -1478,6 +1477,204 @@ MonoBehaviour: m_OnValueChanged: m_PersistentCalls: m_Calls: [] +--- !u!1 &1724549733395132578 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5517462769663635456} + - component: {fileID: 2204286804444043195} + - component: {fileID: 4187291493996619358} + m_Layer: 0 + m_Name: Text (TMP) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &5517462769663635456 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1724549733395132578} + 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: 3460461322939268863} + m_RootOrder: 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 &2204286804444043195 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1724549733395132578} + m_CullTransparentMesh: 1 +--- !u!114 &4187291493996619358 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1724549733395132578} + 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: Button + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4281479730 + m_fontColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, 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: 24 + m_fontSizeBase: 24 + 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 &1732184504855256403 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4661603630291033394} + - component: {fileID: 1359095689087791347} + m_Layer: 0 + m_Name: HoldingListContent + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &4661603630291033394 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1732184504855256403} + 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: 733329886733235994} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0} + m_AnchorMax: {x: 0.5, y: 0} + m_AnchoredPosition: {x: 0, y: 350} + m_SizeDelta: {x: 500, y: 150} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1359095689087791347 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1732184504855256403} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 30649d3a9faa99c48a7b1166b86bf2a0, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_ChildAlignment: 4 + m_Spacing: 0 + m_ChildForceExpandWidth: 0 + m_ChildForceExpandHeight: 0 + m_ChildControlWidth: 0 + m_ChildControlHeight: 0 + m_ChildScaleWidth: 1 + m_ChildScaleHeight: 0 + m_ReverseArrangement: 0 --- !u!1 &1988368053867513301 GameObject: m_ObjectHideFlags: 0 @@ -1509,10 +1706,12 @@ RectTransform: - {fileID: 798687730} - {fileID: 40377006} - {fileID: 1076265206} + - {fileID: 8411292500737609253} - {fileID: 1973886306} - {fileID: 263713420} - {fileID: 5334463587201139456} - {fileID: 6880760287070379452} + - {fileID: 5782647815976031890} m_Father: {fileID: 3351518597856635956} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -1587,7 +1786,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_text: Cannot get more cards + m_text: Cannot Get More Cards m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} @@ -1708,6 +1907,43 @@ MonoBehaviour: m_EditorClassIdentifier: m_Padding: {x: 0, y: 0, z: 0, w: 0} m_Softness: {x: 0, y: 0} +--- !u!1 &2396907874329258239 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8411292500737609253} + m_Layer: 0 + m_Name: DiscardHoldingListContent + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &8411292500737609253 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2396907874329258239} + 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: 733329886733235994} + m_Father: {fileID: 6342785598281792429} + m_RootOrder: 3 + 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!1 &3370262408006457270 GameObject: m_ObjectHideFlags: 0 @@ -1873,6 +2109,410 @@ MonoBehaviour: m_OnValueChanged: m_PersistentCalls: m_Calls: [] +--- !u!1 &3476540412861371502 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5782647815976031890} + - component: {fileID: 5601922261848718432} + - component: {fileID: 4356355268866488083} + - component: {fileID: 110150063494468554} + m_Layer: 0 + m_Name: EndRound + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &5782647815976031890 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3476540412861371502} + 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: 3729732707831903442} + m_Father: {fileID: 6342785598281792429} + m_RootOrder: 8 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 1, y: 0} + m_AnchorMax: {x: 1, y: 0} + m_AnchoredPosition: {x: -64.91785, y: 174} + m_SizeDelta: {x: 91.8357, y: 48} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &5601922261848718432 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3476540412861371502} + m_CullTransparentMesh: 1 +--- !u!114 &4356355268866488083 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3476540412861371502} + 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: 10905, 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!114 &110150063494468554 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3476540412861371502} + 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: 1 + 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: 0} + m_PressedSprite: {fileID: 0} + 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: 4356355268866488083} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 4683416251428496592} + m_TargetAssemblyTypeName: Deck, Assembly-CSharp + m_MethodName: EndRound + 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 &3885718878480366010 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3729732707831903442} + - component: {fileID: 6198041354955713173} + - component: {fileID: 3987373594471584372} + m_Layer: 0 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &3729732707831903442 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3885718878480366010} + 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: 5782647815976031890} + m_RootOrder: 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 &6198041354955713173 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3885718878480366010} + m_CullTransparentMesh: 1 +--- !u!114 &3987373594471584372 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3885718878480366010} + 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: End Roung + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4281479730 + m_fontColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, 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: 24 + m_fontSizeBase: 24 + 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 &4375913494175753485 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7804638693485838791} + - component: {fileID: 1430740663251065654} + - component: {fileID: 1674175299640006281} + m_Layer: 0 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &7804638693485838791 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4375913494175753485} + 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: 6362202468938346973} + m_RootOrder: 0 + 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: 200, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &1430740663251065654 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4375913494175753485} + m_CullTransparentMesh: 1 +--- !u!114 &1674175299640006281 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4375913494175753485} + 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: Choose {0} Card(s) to Discard... + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4294967295 + m_fontColor: {r: 1, g: 1, b: 1, 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: 18 + m_fontSizeBase: 36 + m_fontWeight: 400 + m_enableAutoSizing: 1 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 2 + m_VerticalAlignment: 256 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_enableWordWrapping: 0 + 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 &4446730164721626295 GameObject: m_ObjectHideFlags: 0 @@ -1909,7 +2549,7 @@ RectTransform: m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 1, y: 1} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 20} + m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 1} --- !u!114 &8872564822953752344 MonoBehaviour: @@ -1978,7 +2618,7 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: - - {fileID: 1079134533359834768} + - {fileID: 5277353724762008331} - {fileID: 6342785598281792429} - {fileID: 3610697573659096910} - {fileID: 5370199686201665961} @@ -2033,14 +2673,7 @@ MonoBehaviour: - {fileID: 11400000, guid: 9eb62481994b51e4897a57499081c3db, type: 2} - {fileID: 11400000, guid: 9eb62481994b51e4897a57499081c3db, type: 2} - {fileID: 11400000, guid: 9eb62481994b51e4897a57499081c3db, type: 2} - drawDisplayList: [] - discardDisplayList: [] - wasteList: [] randomSeed: 0 - handCardTemplate: {fileID: 5083260762951157943} - cardDisplayTemplate: {fileID: 7657681008272561115} - drawListContent: {fileID: 624918691686486625} - discardListContent: {fileID: 3370262408006457270} maxCardinHandLimit: 10 maxCardRemainLimit: 5 --- !u!1 &4772833656592657312 @@ -2265,7 +2898,7 @@ GameObject: - component: {fileID: 5277353724762008331} - component: {fileID: 4557550089613717304} m_Layer: 0 - m_Name: HandCardTemplate + m_Name: CardTemplate m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -2285,7 +2918,7 @@ RectTransform: m_Children: - {fileID: 4995898324929614793} - {fileID: 6122809719609692964} - m_Father: {fileID: 1973886306} + m_Father: {fileID: 3351518597856635956} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} @@ -2313,127 +2946,6 @@ MonoBehaviour: m_FlexibleWidth: -1 m_FlexibleHeight: -1 m_LayoutPriority: 1 ---- !u!1 &5528843391902583636 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 338661606660258352} - - component: {fileID: 4830102049849777958} - - component: {fileID: 3735503200560041390} - - component: {fileID: 8218412300156062905} - m_Layer: 0 - m_Name: Button - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &338661606660258352 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 5528843391902583636} - 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: 1079134533359834768} - m_RootOrder: 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 &4830102049849777958 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 5528843391902583636} - m_CullTransparentMesh: 1 ---- !u!114 &3735503200560041390 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 5528843391902583636} - 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: 10905, 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!114 &8218412300156062905 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 5528843391902583636} - 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: 1 - 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: 0} - m_PressedSprite: {fileID: 0} - 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: 0} - m_OnClick: - m_PersistentCalls: - m_Calls: [] --- !u!1 &5654186365262363981 GameObject: m_ObjectHideFlags: 0 @@ -2464,11 +2976,11 @@ RectTransform: m_Children: - {fileID: 1190278128854001673} m_Father: {fileID: 6342785598281792429} - m_RootOrder: 6 + m_RootOrder: 7 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0} m_AnchorMax: {x: 0.5, y: 0} - m_AnchoredPosition: {x: 0, y: 198.8} + m_AnchoredPosition: {x: 0, y: 200} m_SizeDelta: {x: 100, y: 20} m_Pivot: {x: 0.5, y: 0.5} --- !u!1 &6593117350918236961 @@ -2504,11 +3016,11 @@ RectTransform: m_Children: - {fileID: 2059345702030202642} m_Father: {fileID: 6342785598281792429} - m_RootOrder: 5 + m_RootOrder: 6 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 1, y: 0} m_AnchorMax: {x: 1, y: 0} - m_AnchoredPosition: {x: -64.91785, y: 138.5} + m_AnchoredPosition: {x: -64.91785, y: 97} m_SizeDelta: {x: 91.83569, y: 30} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &3320439997153222485 @@ -2605,7 +3117,7 @@ MonoBehaviour: m_StringArgument: m_BoolArgument: 0 m_CallState: 2 ---- !u!1 &7657681008272561115 +--- !u!1 &6638532102055639296 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -2613,57 +3125,223 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 1079134533359834768} - - component: {fileID: 4261762708620875694} + - component: {fileID: 6362202468938346973} m_Layer: 0 - m_Name: CardDisplayTemplate + m_Name: DiscardWarning m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 0 ---- !u!224 &1079134533359834768 + m_IsActive: 1 +--- !u!224 &6362202468938346973 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7657681008272561115} + m_GameObject: {fileID: 6638532102055639296} 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: 338661606660258352} - - {fileID: 8207913208567212589} - m_Father: {fileID: 3351518597856635956} + - {fileID: 7804638693485838791} + m_Father: {fileID: 733329886733235994} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0} + m_AnchorMax: {x: 0.5, y: 0} + m_AnchoredPosition: {x: 0, y: 200} + m_SizeDelta: {x: 100, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &8554190406370288895 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 733329886733235994} + - component: {fileID: 2397099347365394005} + m_Layer: 0 + m_Name: Viewport + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &733329886733235994 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8554190406370288895} + 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: 3460461322939268863} + - {fileID: 4661603630291033394} + - {fileID: 6362202468938346973} + m_Father: {fileID: 8411292500737609253} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 225, y: 0} - m_SizeDelta: {x: 100, y: 139.8} + 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!114 &4261762708620875694 +--- !u!114 &2397099347365394005 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7657681008272561115} + m_GameObject: {fileID: 8554190406370288895} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3} + m_Script: {fileID: 11500000, guid: 3312d7739989d2b4e91e6319e9a96d76, type: 3} m_Name: m_EditorClassIdentifier: - m_IgnoreLayout: 0 - m_MinWidth: -1 - m_MinHeight: -1 - m_PreferredWidth: 100 - m_PreferredHeight: 139.8 - m_FlexibleWidth: -1 - m_FlexibleHeight: -1 - m_LayoutPriority: 1 + m_Padding: {x: 0, y: 0, z: 0, w: 0} + m_Softness: {x: 0, y: 0} +--- !u!1 &8992317519068083443 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3460461322939268863} + - component: {fileID: 946319960264186118} + - component: {fileID: 8347219298357505338} + - component: {fileID: 7627618598643411495} + m_Layer: 0 + m_Name: DiscardButton + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &3460461322939268863 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8992317519068083443} + 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: 5517462769663635456} + m_Father: {fileID: 733329886733235994} + m_RootOrder: 0 + 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: -24} + m_SizeDelta: {x: 160, y: 30} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &946319960264186118 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8992317519068083443} + m_CullTransparentMesh: 1 +--- !u!114 &8347219298357505338 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8992317519068083443} + 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: 10905, 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!114 &7627618598643411495 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8992317519068083443} + 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: 1 + 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: 0} + m_PressedSprite: {fileID: 0} + 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: 8347219298357505338} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 4683416251428496592} + m_TargetAssemblyTypeName: Deck, Assembly-CSharp + m_MethodName: DiscardHoldingListCards + 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!1001 &5917271529096462950 PrefabInstance: m_ObjectHideFlags: 0 @@ -2726,65 +3404,3 @@ Transform: m_CorrespondingSourceObject: {fileID: 497306795194634562, guid: 1abb286fb916b7e438ee6a04c1e0e21b, type: 3} m_PrefabInstance: {fileID: 5917271529096462950} m_PrefabAsset: {fileID: 0} ---- !u!1001 &8578957576057944943 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 1079134533359834768} - m_Modifications: - - target: {fileID: 497306795194634562, guid: 1abb286fb916b7e438ee6a04c1e0e21b, type: 3} - propertyPath: m_RootOrder - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 497306795194634562, guid: 1abb286fb916b7e438ee6a04c1e0e21b, type: 3} - propertyPath: m_LocalPosition.x - value: 664.5282 - objectReference: {fileID: 0} - - target: {fileID: 497306795194634562, guid: 1abb286fb916b7e438ee6a04c1e0e21b, type: 3} - propertyPath: m_LocalPosition.y - value: 189.92244 - objectReference: {fileID: 0} - - target: {fileID: 497306795194634562, guid: 1abb286fb916b7e438ee6a04c1e0e21b, type: 3} - propertyPath: m_LocalPosition.z - value: -3.0574389 - objectReference: {fileID: 0} - - target: {fileID: 497306795194634562, guid: 1abb286fb916b7e438ee6a04c1e0e21b, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 497306795194634562, guid: 1abb286fb916b7e438ee6a04c1e0e21b, type: 3} - propertyPath: m_LocalRotation.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 497306795194634562, guid: 1abb286fb916b7e438ee6a04c1e0e21b, type: 3} - propertyPath: m_LocalRotation.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 497306795194634562, guid: 1abb286fb916b7e438ee6a04c1e0e21b, type: 3} - propertyPath: m_LocalRotation.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 497306795194634562, guid: 1abb286fb916b7e438ee6a04c1e0e21b, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 497306795194634562, guid: 1abb286fb916b7e438ee6a04c1e0e21b, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 497306795194634562, guid: 1abb286fb916b7e438ee6a04c1e0e21b, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 5470971240814093006, guid: 1abb286fb916b7e438ee6a04c1e0e21b, type: 3} - propertyPath: m_Name - value: Card - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 1abb286fb916b7e438ee6a04c1e0e21b, type: 3} ---- !u!4 &8207913208567212589 stripped -Transform: - m_CorrespondingSourceObject: {fileID: 497306795194634562, guid: 1abb286fb916b7e438ee6a04c1e0e21b, type: 3} - m_PrefabInstance: {fileID: 8578957576057944943} - m_PrefabAsset: {fileID: 0} diff --git a/Assets/Scripts/Deck.cs b/Assets/Scripts/Deck.cs index a08a7ad..6ccccbf 100644 --- a/Assets/Scripts/Deck.cs +++ b/Assets/Scripts/Deck.cs @@ -2,30 +2,19 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; +using TMPro; public class Deck : MonoBehaviour { public List cardDataList; - - //public List drawList; - public List drawDisplayList; - - //public List handList; - //public List handDisplayList; - - //public List discardList; - public List discardDisplayList; - - public List wasteList; public int randomSeed; - public GameObject handCardTemplate; - public GameObject cardDisplayTemplate; + private GameObject cardTemplate; - public GameObject drawListContent; - public GameObject discardListContent; + private GameObject handListContent; + private GameObject drawListContent; + private GameObject discardListContent; - private int cardInHandAmount = 0; // Card Limit public int maxCardinHandLimit = 10; public int maxCardRemainLimit = 5; @@ -34,25 +23,35 @@ public class Deck : MonoBehaviour private float warningDisplayCountDown; private float warningDisplayTime = 1.0f; + private GameObject discardHoldingListContent; + private TextMeshProUGUI discardWarningDisplayText; + + // Start is called before the first frame update void Start() { + drawListContent = transform.Find("DrawListContent/Viewport/Content").gameObject; + drawListContent.transform.parent.parent.gameObject.SetActive(false); + discardListContent = transform.Find("DiscardListContent/Viewport/Content").gameObject; + discardListContent.transform.parent.parent.gameObject.SetActive(false); + handListContent = transform.Find("Content/HandListContent").gameObject; + + cardTemplate = transform.Find("CardTemplate").gameObject; reachCardinHandLimitWarningDisplay = transform.Find("Content/LimitWarning").gameObject; reachCardinHandLimitWarningDisplay.SetActive(false); + discardHoldingListContent = transform.Find("Content/DiscardHoldingListContent/Viewport/HoldingListContent").gameObject; + discardHoldingListContent.transform.parent.parent.gameObject.SetActive(false); + discardWarningDisplayText = transform.Find("Content/DiscardHoldingListContent/Viewport/DiscardWarning/Text").gameObject.GetComponent(); randomSeed = 200; Random.InitState(randomSeed); for (int i = 0; i < cardDataList.Count; i++) { - //drawList.Add(cardDataList[i]); - GameObject tempDrawDisplay = Instantiate(cardDisplayTemplate.gameObject, transform.Find("DrawListContent/Viewport/Content")); + GameObject tempDrawDisplay = Instantiate(cardTemplate.gameObject, transform.Find("DrawListContent/Viewport/Content")); tempDrawDisplay.transform.Find("Card").gameObject.GetComponent().SetCardData(cardDataList[i]); tempDrawDisplay.transform.Find("Button").gameObject.GetComponent().sprite = cardDataList[i].artwork; tempDrawDisplay.SetActive(true); - drawDisplayList.Add(tempDrawDisplay); } - drawListContent.SetActive(false); - discardListContent.SetActive(false); } // Update is called once per frame @@ -77,30 +76,21 @@ public class Deck : MonoBehaviour { for (int i = 0; i < amount; i++) { - if (cardInHandAmount > maxCardinHandLimit - 1) + if (handListContent.transform.childCount > maxCardinHandLimit - 1) { ActivateCardInHandLimitWarning(); return; } - if (drawDisplayList.Count == 0) + if (drawListContent.transform.childCount == 0) { Shuffle(); } - if (drawDisplayList.Count == 0) + if (drawListContent.transform.childCount == 0) { return; } - int randomIndex = Random.Range(0, drawDisplayList.Count); - GameObject cardObj = Instantiate(handCardTemplate.gameObject, transform.Find("Content/HandList")); - var tempCardData = drawDisplayList[randomIndex].transform.Find("Card").gameObject.GetComponent().cardData; - cardObj.transform.Find("Card").gameObject.GetComponent().SetCardData(tempCardData); - cardObj.transform.Find("Button").gameObject.GetComponent().sprite = tempCardData.artwork; - cardObj.SetActive(true); - cardInHandAmount++; - //handDisplayList.Add(cardObj); - //handList.Add(drawList[randomIndex]); - Destroy(drawDisplayList[randomIndex]); - drawDisplayList.RemoveAt(randomIndex); + int randomIndex = Random.Range(0, drawListContent.transform.childCount); + drawListContent.transform.GetChild(randomIndex).transform.SetParent(handListContent.transform); } } @@ -120,15 +110,21 @@ public class Deck : MonoBehaviour public void UseThisCard(GameObject card) { - GameObject tempDiscardDisplay = Instantiate(cardDisplayTemplate.gameObject, transform.Find("DiscardListContent/Viewport/Content")); - tempDiscardDisplay.SetActive(true); - tempDiscardDisplay.transform.Find("Card").gameObject.GetComponent().SetCardData(card.transform.Find("Card").GetComponent().cardData); - tempDiscardDisplay.transform.Find("Button").gameObject.GetComponent().sprite = card.transform.Find("Card").GetComponent().cardData.artwork; - discardDisplayList.Add(tempDiscardDisplay); - //discardList.Add(card.transform.Find("Card").gameObject.gameObject.GetComponent().cardData); - //handDisplayList.Find(card); - Destroy(card); - cardInHandAmount--; + if (!discardHoldingListContent.transform.parent.parent.gameObject.activeSelf) + { + card.transform.SetParent(discardListContent.transform); + } + else + { + if (card.transform.parent == discardHoldingListContent.transform) + { + card.transform.SetParent(handListContent.transform); + } + else if (handListContent.transform.childCount > maxCardRemainLimit) + { + card.transform.SetParent(discardHoldingListContent.transform); + } + } } // When unit dead @@ -139,60 +135,36 @@ public class Deck : MonoBehaviour public void Shuffle() { - // Put all cards in drawList into discardList - List tempCardDataList = new List(); - for (int i = 0; i < drawDisplayList.Count; i++) + while (drawListContent.transform.childCount != 0) { - tempCardDataList.Add(drawDisplayList[i].transform.Find("Card").GetComponent().cardData); - Destroy(drawDisplayList[i]); + drawListContent.transform.GetChild(drawListContent.transform.childCount - 1).SetParent(discardListContent.transform); } - drawDisplayList.Clear(); - //drawList.Clear(); - for (int i = 0; i < tempCardDataList.Count; i++) + while (discardListContent.transform.childCount != 0) { - GameObject tempCardDisplay = Instantiate(cardDisplayTemplate.gameObject,transform.Find("DrawListContent/Viewport/Content")); - tempCardDisplay.transform.Find("Card").gameObject.GetComponent().SetCardData(tempCardDataList[i]); - tempCardDisplay.transform.Find("Button").gameObject.GetComponent().sprite = tempCardDataList[i].artwork; - tempCardDisplay.SetActive(true); - drawDisplayList.Add(tempCardDisplay); - } - tempCardDataList.Clear(); - - while (discardDisplayList.Count != 0) - { - int index = Random.Range(0, discardDisplayList.Count); - GameObject tempCardDisplay = Instantiate(cardDisplayTemplate.gameObject, transform.Find("DrawListContent/Viewport/Content")); - CardData tempCardData = discardDisplayList[index].transform.Find("Card").GetComponent().cardData; - tempCardDisplay.transform.Find("Card").gameObject.GetComponent().SetCardData(tempCardData); - tempCardDisplay.transform.Find("Button").gameObject.GetComponent().sprite = tempCardData.artwork; - tempCardDisplay.SetActive(true); - drawDisplayList.Add(tempCardDisplay); - Destroy(discardDisplayList[index]); - discardDisplayList.RemoveAt(index); + int index = Random.Range(0, discardListContent.transform.childCount); + discardListContent.transform.GetChild(index).transform.SetParent(drawListContent.transform); }; - Debug.LogError(discardDisplayList.Count); - discardDisplayList.Clear(); } public void ActivateDisplayDrawList() { - drawListContent.SetActive(true); + drawListContent.transform.parent.parent.gameObject.SetActive(true); } public void DeactivateDisplayDrawList() { - drawListContent.SetActive(false); + drawListContent.transform.parent.parent.gameObject.SetActive(false); } public void ActivateDisplayDiscardList() { - discardListContent.SetActive(true); + discardListContent.transform.parent.parent.gameObject.SetActive(true); } public void DeactivateDisplayDiscardList() { - discardListContent.SetActive(false); + discardListContent.transform.parent.parent.gameObject.SetActive(false); } private void ActivateCardInHandLimitWarning() @@ -208,9 +180,27 @@ public class Deck : MonoBehaviour public void EndRound() { - if (cardInHandAmount > maxCardRemainLimit) + if (handListContent.transform.childCount > maxCardRemainLimit) { + ActivateDiscardWarning(); + } + } + private void ActivateDiscardWarning() + { + discardHoldingListContent.transform.parent.parent.gameObject.SetActive(true); + discardWarningDisplayText.text = string.Format("Choose {0} Card(s) to Discard", handListContent.transform.childCount - maxCardRemainLimit); + } + + public void DiscardHoldingListCards() + { + while (discardHoldingListContent.transform.childCount != 0) + { + discardHoldingListContent.transform.GetChild(discardHoldingListContent.transform.childCount - 1).SetParent(discardListContent.transform); + } + if (handListContent.transform.childCount <= maxCardRemainLimit) + { + discardHoldingListContent.transform.parent.parent.gameObject.SetActive(false); } } }