mirror of
https://github.com/smyalygames/monopoly.git
synced 2025-05-18 06:14:10 +02:00
Have started the chance and community chest cards.
This commit is contained in:
parent
42a78f47b6
commit
d7c142590c
@ -1220,6 +1220,7 @@ RectTransform:
|
||||
- {fileID: 1029953937}
|
||||
- {fileID: 1111531777}
|
||||
- {fileID: 1871971151}
|
||||
- {fileID: 929752267}
|
||||
- {fileID: 653887086}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 6
|
||||
@ -1244,6 +1245,9 @@ MonoBehaviour:
|
||||
propertyInfo: {fileID: 943791161}
|
||||
Roll: {fileID: 1628500264}
|
||||
Money: {fileID: 398680385}
|
||||
card: {fileID: 929752266}
|
||||
cardGroup: {fileID: 1017986388}
|
||||
cardText: {fileID: 976489958}
|
||||
--- !u!114 &310476699
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -1265,6 +1269,8 @@ MonoBehaviour:
|
||||
PropertyUI: {fileID: 1871971150}
|
||||
inventory: {fileID: 1029953938}
|
||||
inventoryText: {fileID: 985089324}
|
||||
card: {fileID: 929752266}
|
||||
cardButton: {fileID: 2007862499}
|
||||
--- !u!114 &310476700
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -3104,7 +3110,7 @@ RectTransform:
|
||||
m_Children:
|
||||
- {fileID: 1977242781}
|
||||
m_Father: {fileID: 310476697}
|
||||
m_RootOrder: 4
|
||||
m_RootOrder: 5
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
@ -4655,6 +4661,42 @@ RectTransform:
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!1 &929752266
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 929752267}
|
||||
m_Layer: 5
|
||||
m_Name: Card
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
--- !u!224 &929752267
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 929752266}
|
||||
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_Children:
|
||||
- {fileID: 1110544714}
|
||||
m_Father: {fileID: 310476697}
|
||||
m_RootOrder: 4
|
||||
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 &932880231
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -5015,6 +5057,140 @@ Transform:
|
||||
m_Father: {fileID: 758519666}
|
||||
m_RootOrder: 20
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &976489956
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 976489957}
|
||||
- component: {fileID: 976489959}
|
||||
- component: {fileID: 976489958}
|
||||
m_Layer: 5
|
||||
m_Name: Card Text
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &976489957
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 976489956}
|
||||
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_Children: []
|
||||
m_Father: {fileID: 1110544714}
|
||||
m_RootOrder: 1
|
||||
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: -9.1}
|
||||
m_SizeDelta: {x: 377.93292, y: 149.77313}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &976489958
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 976489956}
|
||||
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: Card Text
|
||||
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: 72
|
||||
m_fontSizeBase: 25
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 1
|
||||
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: 1
|
||||
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!222 &976489959
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 976489956}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!1 &983314464
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -5520,6 +5696,140 @@ CanvasRenderer:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 999209431}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!1 &1017986386
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1017986387}
|
||||
- component: {fileID: 1017986389}
|
||||
- component: {fileID: 1017986388}
|
||||
m_Layer: 5
|
||||
m_Name: Name
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1017986387
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1017986386}
|
||||
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_Children: []
|
||||
m_Father: {fileID: 1235795231}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 0.037475586, y: -0.09592438}
|
||||
m_SizeDelta: {x: 350.1863, y: -0.19188118}
|
||||
m_Pivot: {x: 0, y: 0.5}
|
||||
--- !u!114 &1017986388
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1017986386}
|
||||
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: Type of card
|
||||
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: 20
|
||||
m_fontSizeBase: 20
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 72
|
||||
m_fontStyle: 0
|
||||
m_HorizontalAlignment: 1
|
||||
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: 1
|
||||
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!222 &1017986389
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1017986386}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!1 &1029953936
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -6087,6 +6397,83 @@ Transform:
|
||||
m_Father: {fileID: 758519666}
|
||||
m_RootOrder: 23
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1110544713
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1110544714}
|
||||
- component: {fileID: 1110544716}
|
||||
- component: {fileID: 1110544715}
|
||||
m_Layer: 5
|
||||
m_Name: Panel
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1110544714
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1110544713}
|
||||
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_Children:
|
||||
- {fileID: 1235795231}
|
||||
- {fileID: 976489957}
|
||||
m_Father: {fileID: 929752267}
|
||||
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: -730.0671, y: -408.9817}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1110544715
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1110544713}
|
||||
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: 0.392}
|
||||
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!222 &1110544716
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1110544713}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!1 &1111531776
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -6277,6 +6664,140 @@ CanvasRenderer:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1119948345}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!1 &1157611928
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1157611929}
|
||||
- component: {fileID: 1157611931}
|
||||
- component: {fileID: 1157611930}
|
||||
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 &1157611929
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1157611928}
|
||||
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_Children: []
|
||||
m_Father: {fileID: 2007862498}
|
||||
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!114 &1157611930
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1157611928}
|
||||
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: X
|
||||
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: 1
|
||||
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!222 &1157611931
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1157611928}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!1 &1199958678
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -6464,6 +6985,83 @@ CanvasRenderer:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1209577817}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!1 &1235795230
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1235795231}
|
||||
- component: {fileID: 1235795233}
|
||||
- component: {fileID: 1235795232}
|
||||
m_Layer: 5
|
||||
m_Name: Top
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1235795231
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1235795230}
|
||||
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_Children:
|
||||
- {fileID: 2007862498}
|
||||
- {fileID: 1017986387}
|
||||
m_Father: {fileID: 1110544714}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 21.62259}
|
||||
m_Pivot: {x: 0.5, y: 1}
|
||||
--- !u!114 &1235795232
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1235795230}
|
||||
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: 0}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!222 &1235795233
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1235795230}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!1 &1238945411
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -9908,6 +10506,126 @@ CanvasRenderer:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1983981045}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!1 &2007862497
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2007862498}
|
||||
- component: {fileID: 2007862501}
|
||||
- component: {fileID: 2007862500}
|
||||
- component: {fileID: 2007862499}
|
||||
m_Layer: 5
|
||||
m_Name: Close Button
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &2007862498
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2007862497}
|
||||
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_Children:
|
||||
- {fileID: 1157611929}
|
||||
m_Father: {fileID: 1235795231}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 1, y: 1}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 1.0859985, y: 0}
|
||||
m_SizeDelta: {x: 22.386719, y: 21.624939}
|
||||
m_Pivot: {x: 1, y: 1}
|
||||
--- !u!114 &2007862499
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2007862497}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Navigation:
|
||||
m_Mode: 3
|
||||
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: 2007862500}
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
--- !u!114 &2007862500
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2007862497}
|
||||
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!222 &2007862501
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2007862497}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!1 &2040913807
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -11,12 +11,17 @@ public class MainMenu : MonoBehaviour
|
||||
|
||||
public Button PlayButton; //Imports the play button
|
||||
private string existingProperties; //The variable for the properties
|
||||
private string existingCards;
|
||||
|
||||
void Start() {
|
||||
if (!PropertiesHandler.checkExists()) //Checks if the properties file doesn't exist.
|
||||
if (!PropertiesHandler.CheckPropertyExists()) //Checks if the properties file doesn't exist.
|
||||
{
|
||||
StartCoroutine(GetProperties()); //Downloads the properties json.
|
||||
}
|
||||
else if (!PropertiesHandler.CheckCardExists())
|
||||
{
|
||||
StartCoroutine(GetCards()); //Downloads the cards json.
|
||||
}
|
||||
else
|
||||
{
|
||||
enabled = false; //Stops the update function.
|
||||
@ -29,6 +34,14 @@ public class MainMenu : MonoBehaviour
|
||||
if (existingProperties != null) //Checks if the data has been downloaded
|
||||
{
|
||||
PropertiesHandler.SaveProperties(existingProperties); //Saves the downloaded data
|
||||
}
|
||||
if (existingCards != null)
|
||||
{
|
||||
PropertiesHandler.SaveCards(existingCards); //Saves the downloaded data
|
||||
}
|
||||
|
||||
if (PropertiesHandler.CheckPropertyExists() && PropertiesHandler.CheckCardExists())
|
||||
{
|
||||
PlayButton.interactable = true; //Enables the play button
|
||||
enabled = false; //Stops the update loop
|
||||
}
|
||||
@ -58,4 +71,22 @@ public class MainMenu : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
IEnumerator GetCards()
|
||||
{
|
||||
UnityWebRequest www = UnityWebRequest.Get(Domain.subDomain("includes/get-cards.php"));
|
||||
yield return www.SendWebRequest();
|
||||
|
||||
if (www.isNetworkError || www.isHttpError)
|
||||
{
|
||||
Debug.Log(www.error);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Show results as text
|
||||
string json = www.downloadHandler.text;
|
||||
existingCards = json;
|
||||
//existingProperties = JsonConvert.DeserializeObject<List<Property>>(json);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -17,6 +17,16 @@ public static class PropertiesHandler
|
||||
stream.Close();
|
||||
}
|
||||
|
||||
public static void SaveCards(string data)
|
||||
{
|
||||
BinaryFormatter formatter = new BinaryFormatter();
|
||||
string path = Application.persistentDataPath + "/cards.smyal";
|
||||
FileStream stream = new FileStream(path, FileMode.Create);
|
||||
|
||||
formatter.Serialize(stream, data);
|
||||
stream.Close();
|
||||
}
|
||||
|
||||
public static string LoadProperties()
|
||||
{
|
||||
string path = Application.persistentDataPath + "/properties.smyal";
|
||||
@ -37,10 +47,36 @@ public static class PropertiesHandler
|
||||
}
|
||||
}
|
||||
|
||||
public static bool checkExists()
|
||||
public static string LoadCards()
|
||||
{
|
||||
string path = Application.persistentDataPath + "/cards.smyal";
|
||||
if (File.Exists(path))
|
||||
{
|
||||
BinaryFormatter formatter = new BinaryFormatter();
|
||||
FileStream stream = new FileStream(path, FileMode.Open);
|
||||
|
||||
string data = formatter.Deserialize(stream) as string;
|
||||
stream.Close();
|
||||
|
||||
return data;
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError("Save file not found in " + path);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static bool CheckPropertyExists()
|
||||
{
|
||||
string path = Application.persistentDataPath + "/properties.smyal";
|
||||
return File.Exists(path);
|
||||
}
|
||||
|
||||
public static bool CheckCardExists()
|
||||
{
|
||||
string path = Application.persistentDataPath + "/cards.smyal";
|
||||
return File.Exists(path);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -19,6 +19,9 @@ public class ButtonHandler : MonoBehaviour
|
||||
private bool inventoryOpen = false;
|
||||
private Inventory inventoryClass;
|
||||
|
||||
public GameObject card;
|
||||
public Button cardButton;
|
||||
|
||||
public void DisableRollDice()
|
||||
{
|
||||
rollDice.interactable = false;
|
||||
@ -79,6 +82,11 @@ public class ButtonHandler : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
void CloseCard()
|
||||
{
|
||||
card.SetActive(false);
|
||||
}
|
||||
|
||||
private Main main;
|
||||
|
||||
void Awake()
|
||||
@ -92,6 +100,7 @@ public class ButtonHandler : MonoBehaviour
|
||||
buyButtonButton.onClick.AddListener(BuyPropertyClick);
|
||||
nextTurn.onClick.AddListener(NextTurn);
|
||||
inventory.onClick.AddListener(ToggleInventory);
|
||||
cardButton.onClick.AddListener(CloseCard);
|
||||
}
|
||||
|
||||
void BuyPropertyClick() {
|
||||
|
13
Assets/Scripts/monopoly/Cards.cs
Normal file
13
Assets/Scripts/monopoly/Cards.cs
Normal file
@ -0,0 +1,13 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class Cards
|
||||
{
|
||||
|
||||
public int card_id;
|
||||
public int card_group;
|
||||
public string card_text;
|
||||
public int card_function;
|
||||
public int? extra;
|
||||
}
|
11
Assets/Scripts/monopoly/Cards.cs.meta
Normal file
11
Assets/Scripts/monopoly/Cards.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e2454549cc26e6f48aa34d62f3cff26a
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -23,4 +23,25 @@ public static class FileHandler
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static string LoadCards()
|
||||
{
|
||||
string path = Application.persistentDataPath + "/cards.smyal"; //This finds the predefined path in LocalLow and tries to find the JSON file in binary.
|
||||
if (File.Exists(path)) //If the file exists...
|
||||
{
|
||||
BinaryFormatter formatter = new BinaryFormatter(); //Gets the binary formatter to convert it into plain text
|
||||
FileStream stream = new FileStream(path, FileMode.Open); //Opens the cards.smyal file
|
||||
|
||||
string data = formatter.Deserialize(stream) as string; //It decodes the binary to a string
|
||||
stream.Close(); //The file is now closed.
|
||||
|
||||
return data; //The data is returned.
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError("Save file not found in " + path); //Sends an error message to the console.
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -148,9 +148,10 @@ public class Board //Creating the class for the board mechanics.
|
||||
public int currentPlayer = 0;
|
||||
public List<Property> existingProperties;
|
||||
public List<Property> avaliableProperties = new List<Property>(); //Has a list of all the available properties.
|
||||
public List<Cards> chance = new List<Cards>();
|
||||
public List<Cards> communityChest = new List<Cards>();
|
||||
|
||||
|
||||
public Board(List<Player> players, List<Property> properties)
|
||||
public Board(List<Player> players, List<Property> properties, List<Cards> existingCards)
|
||||
{
|
||||
this.players = players; //Imports all of the players playing
|
||||
Debug.Log(this.players.Count); //Prints how many players are playing
|
||||
@ -169,16 +170,30 @@ public class Board //Creating the class for the board mechanics.
|
||||
avaliableProperties.Add(properties[i]);
|
||||
}
|
||||
}
|
||||
|
||||
//This appends all the cards into their own respective pile.
|
||||
foreach (Cards card in existingCards)
|
||||
{
|
||||
switch (card.card_group) //Checks what group the card is in.
|
||||
{
|
||||
case 0: //If it is a chance card.
|
||||
chance.Add(card);
|
||||
break;
|
||||
case 1: //If it is a community chest card.
|
||||
communityChest.Add(card);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void MovePlayer(int roll) //This moves the player
|
||||
{
|
||||
players[currentPlayer].Move(roll); //This is telling the player to move in the local player class.
|
||||
textHandler.updateRoll(roll); //This is updating the text on the screen for the roll
|
||||
textHandler.UpdateRoll(roll); //This is updating the text on the screen for the roll
|
||||
|
||||
//Money UI
|
||||
int money = players[currentPlayer].money; //Gets the money the player has
|
||||
textHandler.updateMoney(money); //Updates the money on the UI
|
||||
textHandler.UpdateMoney(money); //Updates the money on the UI
|
||||
|
||||
//Property UI
|
||||
string propertyName = existingProperties[players[currentPlayer].position].property_name; //Gets the property name from where the player is at
|
||||
@ -186,11 +201,11 @@ public class Board //Creating the class for the board mechanics.
|
||||
|
||||
if (propertyValue != 0) //This is for if the property can be bought
|
||||
{
|
||||
textHandler.updateProperty(propertyName, propertyValue); //Updates the UI text for the property info
|
||||
textHandler.UpdateProperty(propertyName, propertyValue); //Updates the UI text for the property info
|
||||
}
|
||||
else
|
||||
{
|
||||
textHandler.updateTile(propertyName); //Updates the UI text for the property info without the value of the property
|
||||
textHandler.UpdateTile(propertyName); //Updates the UI text for the property info without the value of the property
|
||||
}
|
||||
|
||||
buttonHandler.DisableRollDice(); //Disables the user from being able to roll the dice whilst the player is moving
|
||||
@ -205,7 +220,7 @@ public class Board //Creating the class for the board mechanics.
|
||||
if (currentProperty.property_rent >= 100) //Only tax tiles have a rent value of 100 or 200
|
||||
{
|
||||
players[currentPlayer].Pay(Convert.ToInt32(currentProperty.property_rent)); //Makes the player pay the tax and converts int? to int
|
||||
textHandler.updateMoney(players[currentPlayer].money); //Updates the UI for the current amount of money the player has.
|
||||
textHandler.UpdateMoney(players[currentPlayer].money); //Updates the UI for the current amount of money the player has.
|
||||
return;
|
||||
}
|
||||
|
||||
@ -284,7 +299,7 @@ public class Board //Creating the class for the board mechanics.
|
||||
players[findProperty.Item1].Pay(-payment); //This gives the property owner the money.
|
||||
}
|
||||
|
||||
textHandler.updateMoney(players[currentPlayer].money); //Updates the UI for the current amount of money the player has.
|
||||
textHandler.UpdateMoney(players[currentPlayer].money); //Updates the UI for the current amount of money the player has.
|
||||
}
|
||||
|
||||
public void NextPlayer() //This moves the queue to the next player. TODO
|
||||
@ -298,15 +313,27 @@ public class Board //Creating the class for the board mechanics.
|
||||
{
|
||||
currentPlayer++; //Increments the queue to the next player
|
||||
}
|
||||
textHandler.updateMoney(players[currentPlayer].money); //Changes the amount of money the new player has.
|
||||
textHandler.UpdateMoney(players[currentPlayer].money); //Changes the amount of money the new player has.
|
||||
buttonHandler.EnableRollDice(); //Re-enables the user to roll the dice.
|
||||
}
|
||||
|
||||
public bool CheckBuyable(int position) //This checks if the property can be bought by the user.
|
||||
public bool CheckProperty(int position) //This checks if the property can be bought by the user.
|
||||
{
|
||||
|
||||
Property property = existingProperties[position]; //Gets the property the player is currently at.
|
||||
|
||||
if (property.property_group == "chance")
|
||||
{
|
||||
UseCard(0);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (property.property_group == "chest")
|
||||
{
|
||||
UseCard(1);
|
||||
return false;
|
||||
}
|
||||
|
||||
for (int i = 0; i < avaliableProperties.Count; i++) //Checks through all of the properties that are buyable using a linear search
|
||||
{
|
||||
if (property.property_name == avaliableProperties[i].property_name) //Checks if the name exists in the available properties that can be purchased.
|
||||
@ -316,7 +343,7 @@ public class Board //Creating the class for the board mechanics.
|
||||
}
|
||||
}
|
||||
buttonHandler.DisableBuying(); //If the name is not found, the property has not been found.
|
||||
buttonHandler.EnableRollDice(); //Allows the user to roll the dice if the property cannot be bought
|
||||
buttonHandler.EnableNextTurn(); //Allows the user to roll the dice if the property cannot be bought
|
||||
return false; //Returns false if the property is not buybale.
|
||||
}
|
||||
|
||||
@ -356,7 +383,7 @@ public class Board //Creating the class for the board mechanics.
|
||||
{
|
||||
avaliableProperties.RemoveAt(i); //Removes the property from the list.
|
||||
players[currentPlayer].BuyProperty(property); //This buys the property in the player class
|
||||
textHandler.updateMoney(players[currentPlayer].money); //This updates the amount of money the player has.
|
||||
textHandler.UpdateMoney(players[currentPlayer].money); //This updates the amount of money the player has.
|
||||
buttonHandler.DisableBuying(); //Removes the buy button.
|
||||
buttonHandler.EnableNextTurn();
|
||||
return; //Stops the function
|
||||
@ -457,6 +484,20 @@ public class Board //Creating the class for the board mechanics.
|
||||
|
||||
return false; //This returns false to say that the hotel cannot be sold.
|
||||
}
|
||||
|
||||
public void UseCard(int group) //TODO
|
||||
{
|
||||
switch (group)
|
||||
{
|
||||
case 0:
|
||||
textHandler.ShowCard(group, chance[0].card_text);
|
||||
break;
|
||||
case 1:
|
||||
textHandler.ShowCard(group, communityChest[0].card_text);
|
||||
break;
|
||||
}
|
||||
buttonHandler.EnableNextTurn();
|
||||
}
|
||||
}
|
||||
|
||||
public class Player
|
||||
@ -624,6 +665,7 @@ public class Player
|
||||
public class Main : MonoBehaviour
|
||||
{
|
||||
private List<Property> existingProperties;
|
||||
private List<Cards> existingCards;
|
||||
public Board board;
|
||||
|
||||
//Player variables
|
||||
@ -636,7 +678,8 @@ public class Main : MonoBehaviour
|
||||
players.Add(new Player("coomer", 1, GameObject.Find("/Players/Player2")));
|
||||
Debug.Log(players[0].name); //This is just checking if the player has been assigned.
|
||||
existingProperties = JsonConvert.DeserializeObject<List<Property>>(FileHandler.LoadProperties()); //This loads via JSON all the properties from a file which was originally downloaded from a server.
|
||||
board = new Board(players, existingProperties); //Creates the board class.
|
||||
existingCards = JsonConvert.DeserializeObject<List<Cards>>(FileHandler.LoadCards()); //This loads via JSON all the cards from a file which was originally downloaded from a server.
|
||||
board = new Board(players, existingProperties, existingCards); //Creates the board class.
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -53,10 +53,9 @@ public class Movement : MonoBehaviour
|
||||
return;
|
||||
}
|
||||
|
||||
if (!main.board.CheckBuyable(roll))
|
||||
if (!main.board.CheckProperty(roll))
|
||||
{
|
||||
main.board.CheckFees();
|
||||
main.board.NextPlayer();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
using JetBrains.Annotations;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class TextHandler : MonoBehaviour
|
||||
{
|
||||
@ -15,35 +16,53 @@ public class TextHandler : MonoBehaviour
|
||||
public TextMeshProUGUI Money;
|
||||
private string money;
|
||||
|
||||
public void updateTile (string propertyName)
|
||||
public GameObject card;
|
||||
public TextMeshProUGUI cardGroup;
|
||||
public TextMeshProUGUI cardText;
|
||||
|
||||
public void UpdateTile (string propertyName)
|
||||
{
|
||||
this.propertyName = propertyName;
|
||||
propertyInfo.text = $"Current tile: {this.propertyName}";
|
||||
}
|
||||
|
||||
public void updateProperty (string propertyName, int? propertyValue)
|
||||
public void UpdateProperty (string propertyName, int? propertyValue)
|
||||
{
|
||||
this.propertyName = propertyName;
|
||||
this.propertyValue = propertyValue.ToString();
|
||||
propertyInfo.text = $"Current property: {this.propertyName}\nValue: {this.propertyValue}";
|
||||
}
|
||||
|
||||
public void updateRoll(int roll)
|
||||
public void UpdateRoll(int roll)
|
||||
{
|
||||
this.roll = roll.ToString();
|
||||
Roll.text = $"Rolled: {this.roll}";
|
||||
}
|
||||
|
||||
public void updateMoney(int money)
|
||||
public void UpdateMoney(int money)
|
||||
{
|
||||
this.money = money.ToString();
|
||||
Money.text = $"Money: {this.money}";
|
||||
}
|
||||
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
public void ShowCard(int group, string text)
|
||||
{
|
||||
switch (group)
|
||||
{
|
||||
case 0:
|
||||
cardGroup.text = "Chance";
|
||||
break;
|
||||
case 1:
|
||||
cardGroup.text = "Community Chest";
|
||||
break;
|
||||
default:
|
||||
cardGroup.text = "";
|
||||
break;
|
||||
}
|
||||
|
||||
cardText.text = text.Replace("\\n", "\n");; //Changes \n to machine readable new line
|
||||
|
||||
card.SetActive(true);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
33
Assets/cards.csv
Normal file
33
Assets/cards.csv
Normal file
@ -0,0 +1,33 @@
|
||||
card_id,card_group,card_text,card_function,extra
|
||||
1,0,"TAKE A TRIP TO\nKINGS CROSS STATION.\nIF YOU PASS GO,\nCOLLECT 200.",1,5
|
||||
2,0,BANK PAYS YOU\nDIVIDEND OF 50.,2,50
|
||||
3,0,"MAKE GENERAL REPAIRS\nON ALL YOUR PROPERTY:\nFOR EACH HOUSE PAY 25,\nFOR EACH HOTEL PAY 100.",3,
|
||||
4,0,"ADVANCE TO THE\nNEAREST STATION.\n\n If UNOWNED, you may\nbuy it from the Bank.\n\nIf OWNED, pay owner\ntwice the rental to which\nthey are otherwise entitled.",4,
|
||||
5,0,ADVANCE TO\nMAYFAIR.,1,39
|
||||
6,0,YOU HAVE BEEN ELECTED\nCHAIRMAN OF THE BOARD.\nPAY EACH PLAYER 50.,6,50
|
||||
7,0,"ADVANCE TO\nTHE NEAREST UTILITY.\n\nIf UNOWNED, you may\nbuy it from the Bank.\n\nIf OWNED, throw dice\nand pay owner 10 times\nthe amount thrown.",5,
|
||||
8,0,"ADVANCE TO THE\nNEAREST STATION.\n\n If UNOWNED, you may\nbuy it from the Bank.\n\nIf OWNED, pay owner\ntwice the rental to which\nthey are otherwise entitled.",4,
|
||||
9,0,"ADVANCE TO\nPALL MALL.\nIF YOU PASS GO,\nCOLLECT 200.",1,11
|
||||
10,0,SPEEDING FINE 15.,7,15
|
||||
11,0,GO BACK\nTHREE SPACES.,8,
|
||||
12,0,YOUR BUILDING\nLOAN MATURES.\nCOLLECT 150.,2,150
|
||||
13,0,ADVANCE TO GO.\n(COLLECT 200),1,0
|
||||
14,0,"GO TO JAIL. GO DIRECTLY TO JAIL,\nDO NOT PASS GO, DO NOT COLLECT 200.",1,40
|
||||
15,0,"ADVANCE TO\nTRAFALGAR SQUARE.\nIF YOU PASS GO,\nCOLLECT 200.",1,24
|
||||
16,0,*GET OUT OF JAIL FREE.*,9,
|
||||
17,1,DOCTOR'S FEES.\nPAY 50.,7,50
|
||||
18,1,SCHOOL FEES.\nPAY 50.,7,50
|
||||
19,1,INCOME TAX REFUND.\nCOLLECT 20,2,20
|
||||
20,1,"GO TO JAIL. GO DIRECTLY TO JAIL,\nDO NOT PASS GO, DO NOT COLLECT 200.",1,40
|
||||
21,1,LIFE INSURANCE MATURES.\nCOLLECT 100.,2,100
|
||||
22,1,YOU INHERIT\n100.,2,100
|
||||
23,1,RECEIVE 25\nCONSULTANCY FEE.,2,25
|
||||
24,1,BANK ERROR\nIN YOUR FAVOUR.\nCOLLECT 200.,2,200
|
||||
25,1,HOLIDAY FUND MATURES.\nRECEIVE 100.,2,100
|
||||
26,1,YOU HAVE WON\nSECOND PRIZE IN\nA BEAUTY CONTEST.\nCOLLECT 10.,2,10
|
||||
27,1,YOU ARE ASSESSED\nFOR STREET REPAIRS:\nPAY 40 PER HOUSE AND\n115 PER HOTEL YOU OWN.,10,
|
||||
28,1,HOSPITAL FEES.\nPAY 100.,7,100
|
||||
29,1,IT IS YOUR BIRTHDAY\nCOLLECT 10\nFROM EVERY PLAYER.,11,10
|
||||
30,1,FROM SALE OF STOCK\nYOU GET 50.,2,50
|
||||
31,1,ADVANCE TO GO.\n(COLLECT 200),1,0
|
||||
32,1,*GET OUT OF JAIL FREE.*,9,
|
|
7
Assets/cards.csv.meta
Normal file
7
Assets/cards.csv.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ad3c9732639538f409ef98de72a4782c
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/cards.xlsx
Normal file
BIN
Assets/cards.xlsx
Normal file
Binary file not shown.
7
Assets/cards.xlsx.meta
Normal file
7
Assets/cards.xlsx.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 25012c01f1f996c45ac7abadb2dd45b3
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
16
chance.txt
Normal file
16
chance.txt
Normal file
@ -0,0 +1,16 @@
|
||||
TAKE A TRIP TO\nKINGS CROSS STATION.\nIF YOU PASS GO,\nCOLLECT 200.
|
||||
BANK PAYS YOU\nDIVIDEND OF 50.
|
||||
MAKE GENERAL REPAIRS\nON ALL YOUR PROPERTY:\nFOR EACH HOUSE PAY 25,\nFOR EACH HOTEL PAY 100.
|
||||
ADVANCE TO THE\nNEAREST STATION.\n\n If UNOWNED, you may\nbuy it from the Bank.\n\nIf OWNED, pay owner\ntwice the rental to which\nthey are otherwise entitled.
|
||||
ADVANCE TO\nMAYFAIR.
|
||||
YOU HAVE BEEN ELECTED\nCHAIRMAN OF THE BOARD.\nPAY EACH PLAYER 50.
|
||||
ADVANCE TO\nTHE NEAREST UTILITY.\n\nIf UNOWNED, you may\nbuy it from the Bank.\n\nIf OWNED, throw dice\nand pay owner 10 times\nthe amount thrown.
|
||||
ADVANCE TO THE\nNEAREST STATION.\n\n If UNOWNED, you may\nbuy it from the Bank.\n\nIf OWNED, pay owner\ntwice the rental to which\nthey are otherwise entitled.
|
||||
ADVANCE TO\nPALL MALL.\nIF YOU PASS GO,\nCOLLECT 200.
|
||||
SPEEDING FINE 15.
|
||||
GO BACK\nTHREE SPACES.
|
||||
YOUR BUILDING\nLOAN MATURES.\nCOLLECT 150.
|
||||
ADVANCE TO GO.\n(COLLECT 200)
|
||||
GO TO JAIL. GO DIRECTLY TO JAIL,\nDO NOT PASS GO, DO NOT COLLECT 200.
|
||||
ADVANCE TO\nTRAFALGAR SQUARE.\nIF YOU PASS GO,\nCOLLECT 200.
|
||||
*GET OUT OF JAIL FREE.*
|
16
community chest.txt
Normal file
16
community chest.txt
Normal file
@ -0,0 +1,16 @@
|
||||
DOCTOR'S FEES.\nPAY 50.
|
||||
SCHOOL FEES.\nPAY 50.
|
||||
INCOME TAX REFUND.\nCOLLECT 20
|
||||
GO TO JAIL. GO DIRECTLY TO JAIL,\nDO NOT PASS GO, DO NOT COLLECT 200.
|
||||
LIFE INSURANCE MATURES.\nCOLLECT 100.
|
||||
YOU INHERIT\n100.
|
||||
RECEIVE 25\nCONSULTANCY FEE.
|
||||
BANK ERROR\nIN YOUR FAVOUR.\nCOLLECT 200.
|
||||
HOLIDAY FUND MATURES.\nRECEIVE 100.
|
||||
YOU HAVE WON\nSECOND PRIZE IN\nA BEAUTY CONTEST.\nCOLLECT 10.
|
||||
YOU ARE ASSESSED\nFOR STREET REPAIRS:\nPAY 40 PER HOUSE AND\n115 PER HOTEL YOU OWN.
|
||||
HOSPITAL FEES.\nPAY 100.
|
||||
IT IS YOUR BIRTHDAY\nCOLLECT 10\nFROM EVERY PLAYER.
|
||||
FROM SALE OF STOCK\nYOU GET 50.
|
||||
ADVANCE TO GO.\n(COLLECT 200)
|
||||
*GET OUT OF JAIL FREE.*
|
15
definitions of functions for cards.txt
Normal file
15
definitions of functions for cards.txt
Normal file
@ -0,0 +1,15 @@
|
||||
1 - move | extra - move to x (position)
|
||||
2 - bank gives money | extra - give x money (money)
|
||||
3 - make repairs 25 per house and 100 per hotel.
|
||||
4 - advance to the nearest station - requires calculation pay the owner 2x the rent
|
||||
5 - advance to the nearest utility - make player roll dice, then pay owner 10x entitled pay.
|
||||
6 - pay each player a sum of money | extra - money x
|
||||
7 - pay bank | extra - money x
|
||||
8 - go back 3 steps.
|
||||
9 - get out of jail free card
|
||||
10 - street repairs, 40 per house and 115 per hotel.
|
||||
11 - collect money from every player | extra - money x
|
||||
|
||||
groups:
|
||||
1 - chance
|
||||
2 - community chest
|
Loading…
x
Reference in New Issue
Block a user