Spin randomized, Anchored UI, remade betting board
This commit is contained in:
parent
2c260bdf43
commit
68b399c0e2
|
|
@ -1,8 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: da29c36b17b39604a96c1da2d4ba6dea
|
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
|
|
@ -1,78 +0,0 @@
|
||||||
%YAML 1.1
|
|
||||||
%TAG !u! tag:unity3d.com,2011:
|
|
||||||
--- !u!1 &8924960070485457078
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Component:
|
|
||||||
- component: {fileID: 8924960070485457079}
|
|
||||||
- component: {fileID: 8924960070485457077}
|
|
||||||
- component: {fileID: 8924960070485457076}
|
|
||||||
m_Layer: 5
|
|
||||||
m_Name: Image (1)
|
|
||||||
m_TagString: Untagged
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!224 &8924960070485457079
|
|
||||||
RectTransform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 8924960070485457078}
|
|
||||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
|
||||||
m_LocalScale: {x: 0.9, y: 0.9, z: 1}
|
|
||||||
m_ConstrainProportionsScale: 0
|
|
||||||
m_Children: []
|
|
||||||
m_Father: {fileID: 0}
|
|
||||||
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: -44.779545, y: 147}
|
|
||||||
m_SizeDelta: {x: 80, y: 80}
|
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
|
||||||
--- !u!222 &8924960070485457077
|
|
||||||
CanvasRenderer:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 8924960070485457078}
|
|
||||||
m_CullTransparentMesh: 1
|
|
||||||
--- !u!114 &8924960070485457076
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 8924960070485457078}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
m_Material: {fileID: 0}
|
|
||||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
|
||||||
m_RaycastTarget: 1
|
|
||||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
|
||||||
m_Maskable: 1
|
|
||||||
m_OnCullStateChanged:
|
|
||||||
m_PersistentCalls:
|
|
||||||
m_Calls: []
|
|
||||||
m_Sprite: {fileID: 21300000, guid: 9f03355018469e24b8b7014349d14d03, type: 3}
|
|
||||||
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
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: cc7b4f014d32d3942893d0703c8e75e5
|
|
||||||
PrefabImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
|
|
@ -1,78 +0,0 @@
|
||||||
%YAML 1.1
|
|
||||||
%TAG !u! tag:unity3d.com,2011:
|
|
||||||
--- !u!1 &8317692093650720135
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Component:
|
|
||||||
- component: {fileID: 8317692093650720152}
|
|
||||||
- component: {fileID: 8317692093650720154}
|
|
||||||
- component: {fileID: 8317692093650720153}
|
|
||||||
m_Layer: 5
|
|
||||||
m_Name: Image (2)
|
|
||||||
m_TagString: Untagged
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!224 &8317692093650720152
|
|
||||||
RectTransform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 8317692093650720135}
|
|
||||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
|
||||||
m_LocalScale: {x: 0.9, y: 0.9, z: 1}
|
|
||||||
m_ConstrainProportionsScale: 0
|
|
||||||
m_Children: []
|
|
||||||
m_Father: {fileID: 0}
|
|
||||||
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: 52.220486, y: 147.00006}
|
|
||||||
m_SizeDelta: {x: 80, y: 80}
|
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
|
||||||
--- !u!222 &8317692093650720154
|
|
||||||
CanvasRenderer:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 8317692093650720135}
|
|
||||||
m_CullTransparentMesh: 1
|
|
||||||
--- !u!114 &8317692093650720153
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 8317692093650720135}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
m_Material: {fileID: 0}
|
|
||||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
|
||||||
m_RaycastTarget: 1
|
|
||||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
|
||||||
m_Maskable: 1
|
|
||||||
m_OnCullStateChanged:
|
|
||||||
m_PersistentCalls:
|
|
||||||
m_Calls: []
|
|
||||||
m_Sprite: {fileID: 21300000, guid: 89084b01f41dfc5468e2a73aaec3e0a2, type: 3}
|
|
||||||
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
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: 9125211ffd09c2c4cae11afa5fdecad1
|
|
||||||
PrefabImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
|
|
@ -1,78 +0,0 @@
|
||||||
%YAML 1.1
|
|
||||||
%TAG !u! tag:unity3d.com,2011:
|
|
||||||
--- !u!1 &7010741910812832180
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Component:
|
|
||||||
- component: {fileID: 7010741910812832183}
|
|
||||||
- component: {fileID: 7010741910812832201}
|
|
||||||
- component: {fileID: 7010741910812832182}
|
|
||||||
m_Layer: 5
|
|
||||||
m_Name: Image (3)
|
|
||||||
m_TagString: Untagged
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!224 &7010741910812832183
|
|
||||||
RectTransform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 7010741910812832180}
|
|
||||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
|
||||||
m_LocalScale: {x: 0.9, y: 0.9, z: 1}
|
|
||||||
m_ConstrainProportionsScale: 0
|
|
||||||
m_Children: []
|
|
||||||
m_Father: {fileID: 0}
|
|
||||||
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: -150.99997, y: 54.00006}
|
|
||||||
m_SizeDelta: {x: 80, y: 80}
|
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
|
||||||
--- !u!222 &7010741910812832201
|
|
||||||
CanvasRenderer:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 7010741910812832180}
|
|
||||||
m_CullTransparentMesh: 1
|
|
||||||
--- !u!114 &7010741910812832182
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 7010741910812832180}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
m_Material: {fileID: 0}
|
|
||||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
|
||||||
m_RaycastTarget: 1
|
|
||||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
|
||||||
m_Maskable: 1
|
|
||||||
m_OnCullStateChanged:
|
|
||||||
m_PersistentCalls:
|
|
||||||
m_Calls: []
|
|
||||||
m_Sprite: {fileID: 21300000, guid: 5ba2295026661924eb66ab6834af6ae3, type: 3}
|
|
||||||
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
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: 48ec9ff1d7034124a9979bd8ba734aca
|
|
||||||
PrefabImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
|
|
@ -1,78 +0,0 @@
|
||||||
%YAML 1.1
|
|
||||||
%TAG !u! tag:unity3d.com,2011:
|
|
||||||
--- !u!1 &6308668794874138054
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Component:
|
|
||||||
- component: {fileID: 6308668794874138049}
|
|
||||||
- component: {fileID: 6308668794874138051}
|
|
||||||
- component: {fileID: 6308668794874138048}
|
|
||||||
m_Layer: 5
|
|
||||||
m_Name: Image (4)
|
|
||||||
m_TagString: Untagged
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!224 &6308668794874138049
|
|
||||||
RectTransform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 6308668794874138054}
|
|
||||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
|
||||||
m_LocalScale: {x: 0.9, y: 0.9, z: 1}
|
|
||||||
m_ConstrainProportionsScale: 0
|
|
||||||
m_Children: []
|
|
||||||
m_Father: {fileID: 0}
|
|
||||||
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: -151, y: 147}
|
|
||||||
m_SizeDelta: {x: 80, y: 80}
|
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
|
||||||
--- !u!222 &6308668794874138051
|
|
||||||
CanvasRenderer:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 6308668794874138054}
|
|
||||||
m_CullTransparentMesh: 1
|
|
||||||
--- !u!114 &6308668794874138048
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 6308668794874138054}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
m_Material: {fileID: 0}
|
|
||||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
|
||||||
m_RaycastTarget: 1
|
|
||||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
|
||||||
m_Maskable: 1
|
|
||||||
m_OnCullStateChanged:
|
|
||||||
m_PersistentCalls:
|
|
||||||
m_Calls: []
|
|
||||||
m_Sprite: {fileID: 21300000, guid: d5ff57725e48f7842b1a0b25e1b1a24a, type: 3}
|
|
||||||
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
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: bf10e1f32ce5eb349b65ab7030e76aa1
|
|
||||||
PrefabImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
|
|
@ -1,78 +0,0 @@
|
||||||
%YAML 1.1
|
|
||||||
%TAG !u! tag:unity3d.com,2011:
|
|
||||||
--- !u!1 &3800863419358444098
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Component:
|
|
||||||
- component: {fileID: 3800863419358444099}
|
|
||||||
- component: {fileID: 3800863419358444101}
|
|
||||||
- component: {fileID: 3800863419358444100}
|
|
||||||
m_Layer: 5
|
|
||||||
m_Name: Image (5)
|
|
||||||
m_TagString: Untagged
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!224 &3800863419358444099
|
|
||||||
RectTransform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 3800863419358444098}
|
|
||||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
|
||||||
m_LocalScale: {x: 0.9, y: 0.9, z: 1}
|
|
||||||
m_ConstrainProportionsScale: 0
|
|
||||||
m_Children: []
|
|
||||||
m_Father: {fileID: 0}
|
|
||||||
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: -44.779545, y: 54.00006}
|
|
||||||
m_SizeDelta: {x: 80, y: 80}
|
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
|
||||||
--- !u!222 &3800863419358444101
|
|
||||||
CanvasRenderer:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 3800863419358444098}
|
|
||||||
m_CullTransparentMesh: 1
|
|
||||||
--- !u!114 &3800863419358444100
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 3800863419358444098}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
m_Material: {fileID: 0}
|
|
||||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
|
||||||
m_RaycastTarget: 1
|
|
||||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
|
||||||
m_Maskable: 1
|
|
||||||
m_OnCullStateChanged:
|
|
||||||
m_PersistentCalls:
|
|
||||||
m_Calls: []
|
|
||||||
m_Sprite: {fileID: 21300000, guid: 9accbf692d462184da41d37b189d2ce0, type: 3}
|
|
||||||
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
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: 991d9d2ff0c6cf44682e636c2a25e6d3
|
|
||||||
PrefabImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
|
|
@ -1,78 +0,0 @@
|
||||||
%YAML 1.1
|
|
||||||
%TAG !u! tag:unity3d.com,2011:
|
|
||||||
--- !u!1 &3311862706850055944
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Component:
|
|
||||||
- component: {fileID: 3311862706850056183}
|
|
||||||
- component: {fileID: 3311862706850056181}
|
|
||||||
- component: {fileID: 3311862706850056182}
|
|
||||||
m_Layer: 5
|
|
||||||
m_Name: Image (6)
|
|
||||||
m_TagString: Untagged
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!224 &3311862706850056183
|
|
||||||
RectTransform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 3311862706850055944}
|
|
||||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
|
||||||
m_LocalScale: {x: 0.9, y: 0.9, z: 1}
|
|
||||||
m_ConstrainProportionsScale: 0
|
|
||||||
m_Children: []
|
|
||||||
m_Father: {fileID: 0}
|
|
||||||
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: 53.200027, y: 54.00006}
|
|
||||||
m_SizeDelta: {x: 80, y: 80}
|
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
|
||||||
--- !u!222 &3311862706850056181
|
|
||||||
CanvasRenderer:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 3311862706850055944}
|
|
||||||
m_CullTransparentMesh: 1
|
|
||||||
--- !u!114 &3311862706850056182
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 3311862706850055944}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
m_Material: {fileID: 0}
|
|
||||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
|
||||||
m_RaycastTarget: 1
|
|
||||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
|
||||||
m_Maskable: 1
|
|
||||||
m_OnCullStateChanged:
|
|
||||||
m_PersistentCalls:
|
|
||||||
m_Calls: []
|
|
||||||
m_Sprite: {fileID: 21300000, guid: cccfd9331f449fa4ab8cb87a399569fe, type: 3}
|
|
||||||
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
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: f2310b0c11a05904c9bcb666c608ce57
|
|
||||||
PrefabImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
|
|
@ -1,78 +0,0 @@
|
||||||
%YAML 1.1
|
|
||||||
%TAG !u! tag:unity3d.com,2011:
|
|
||||||
--- !u!1 &1407604977329274689
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Component:
|
|
||||||
- component: {fileID: 1407604977329274694}
|
|
||||||
- component: {fileID: 1407604977329274692}
|
|
||||||
- component: {fileID: 1407604977329274695}
|
|
||||||
m_Layer: 5
|
|
||||||
m_Name: Image (7)
|
|
||||||
m_TagString: Untagged
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!224 &1407604977329274694
|
|
||||||
RectTransform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 1407604977329274689}
|
|
||||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
|
||||||
m_LocalScale: {x: 0.9, y: 0.9, z: 1}
|
|
||||||
m_ConstrainProportionsScale: 0
|
|
||||||
m_Children: []
|
|
||||||
m_Father: {fileID: 0}
|
|
||||||
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: 152.00003, y: 54.00006}
|
|
||||||
m_SizeDelta: {x: 80, y: 80}
|
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
|
||||||
--- !u!222 &1407604977329274692
|
|
||||||
CanvasRenderer:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 1407604977329274689}
|
|
||||||
m_CullTransparentMesh: 1
|
|
||||||
--- !u!114 &1407604977329274695
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 1407604977329274689}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
m_Material: {fileID: 0}
|
|
||||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
|
||||||
m_RaycastTarget: 1
|
|
||||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
|
||||||
m_Maskable: 1
|
|
||||||
m_OnCullStateChanged:
|
|
||||||
m_PersistentCalls:
|
|
||||||
m_Calls: []
|
|
||||||
m_Sprite: {fileID: 21300000, guid: 147818af50004cb4fa4a2db64e5cf405, type: 3}
|
|
||||||
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
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: dcceb513ad52a5945a55e9883d96080d
|
|
||||||
PrefabImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
|
|
@ -1,78 +0,0 @@
|
||||||
%YAML 1.1
|
|
||||||
%TAG !u! tag:unity3d.com,2011:
|
|
||||||
--- !u!1 &4471030837070640716
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Component:
|
|
||||||
- component: {fileID: 4471030837070640717}
|
|
||||||
- component: {fileID: 4471030837070640755}
|
|
||||||
- component: {fileID: 4471030837070640754}
|
|
||||||
m_Layer: 5
|
|
||||||
m_Name: Image
|
|
||||||
m_TagString: Untagged
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!224 &4471030837070640717
|
|
||||||
RectTransform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 4471030837070640716}
|
|
||||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
|
||||||
m_LocalScale: {x: 0.9, y: 0.9, z: 1}
|
|
||||||
m_ConstrainProportionsScale: 0
|
|
||||||
m_Children: []
|
|
||||||
m_Father: {fileID: 0}
|
|
||||||
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: 151.90002, y: 147.00006}
|
|
||||||
m_SizeDelta: {x: 80, y: 80}
|
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
|
||||||
--- !u!222 &4471030837070640755
|
|
||||||
CanvasRenderer:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 4471030837070640716}
|
|
||||||
m_CullTransparentMesh: 1
|
|
||||||
--- !u!114 &4471030837070640754
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 4471030837070640716}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
m_Material: {fileID: 0}
|
|
||||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
|
||||||
m_RaycastTarget: 1
|
|
||||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
|
||||||
m_Maskable: 1
|
|
||||||
m_OnCullStateChanged:
|
|
||||||
m_PersistentCalls:
|
|
||||||
m_Calls: []
|
|
||||||
m_Sprite: {fileID: 21300000, guid: a2a7d4a78e551b047abc81b66c5f3778, type: 3}
|
|
||||||
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
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: 443222e8544b1ba47890bb04016473ff
|
|
||||||
PrefabImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
File diff suppressed because it is too large
Load Diff
18
Assets/Scripts/BettingSpace.cs
Normal file
18
Assets/Scripts/BettingSpace.cs
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
public class BettingSpace : MonoBehaviour
|
||||||
|
{
|
||||||
|
public float ratio = 1;
|
||||||
|
void Start()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update is called once per frame
|
||||||
|
void Update()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 2c386988596450b4ea43d1665ccb0900
|
guid: d7c7c2158b5c77d4ead0b20d7e008ce3
|
||||||
MonoImporter:
|
MonoImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
|
|
@ -1,13 +1,18 @@
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
using UnityEngine.UI;
|
||||||
|
|
||||||
public class Chip : MonoBehaviour
|
public class Chip : MonoBehaviour
|
||||||
{
|
{
|
||||||
public float value;
|
public float value;
|
||||||
|
Outline outline;
|
||||||
|
|
||||||
void Awake(){
|
void Awake(){
|
||||||
|
outline = GetComponent<Outline>();
|
||||||
|
RouletteManager.RegisterChip(this);
|
||||||
RouletteManager.OnMoneyAvailablChanged.AddListener(OnMoneyChanged);
|
RouletteManager.OnMoneyAvailablChanged.AddListener(OnMoneyChanged);
|
||||||
|
GetComponent<Button>().onClick.AddListener(OnClicked);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -15,6 +20,14 @@ public class Chip : MonoBehaviour
|
||||||
gameObject.SetActive(newMoney >= value);
|
gameObject.SetActive(newMoney >= value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void OnClicked(){
|
||||||
|
RouletteManager.SelectedChip = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnSelectedChanged(float newVal){
|
||||||
|
outline.effectColor = new Color(1,1,1, (newVal == value) ? 0.5f : 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void OnValidate(){
|
void OnValidate(){
|
||||||
if(value == 0){
|
if(value == 0){
|
||||||
|
|
|
||||||
31
Assets/Scripts/ChipBoard.cs
Normal file
31
Assets/Scripts/ChipBoard.cs
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using EasyButtons;
|
||||||
|
using UnityEngine;
|
||||||
|
using TMPro;
|
||||||
|
using UnityEngine.UI;
|
||||||
|
|
||||||
|
public class ChipBoard : MonoBehaviour
|
||||||
|
{
|
||||||
|
public Transform numberGridParent;
|
||||||
|
public Color redColor,blackColor;
|
||||||
|
|
||||||
|
[Button]
|
||||||
|
void Config(){
|
||||||
|
for(int i= 1; i < RouletteManager.RouletteNumbers.Length-1; i++){
|
||||||
|
GameObject newItem= Instantiate(numberGridParent.GetChild(0).gameObject, numberGridParent);
|
||||||
|
newItem.GetComponent<Image>().color = RouletteManager.Reds.Contains(i+1) ? redColor : blackColor;
|
||||||
|
newItem.GetComponentInChildren<TMP_Text>().text = (i+1).ToString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
void Start()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update is called once per frame
|
||||||
|
void Update()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
11
Assets/Scripts/ChipBoard.cs.meta
Normal file
11
Assets/Scripts/ChipBoard.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 165a391506797e3408cde201860a1510
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -1,76 +0,0 @@
|
||||||
using UnityEngine;
|
|
||||||
using UnityEngine.EventSystems;
|
|
||||||
using UnityEngine.UI;
|
|
||||||
|
|
||||||
public class DragChip : MonoBehaviour, IBeginDragHandler, IDragHandler, IEndDragHandler
|
|
||||||
{
|
|
||||||
public GameObject chipPrefab;
|
|
||||||
public Image rouletteBoardImage;
|
|
||||||
|
|
||||||
private RectTransform canvasRect;
|
|
||||||
private RectTransform chipRect;
|
|
||||||
private Vector2 originalPosition;
|
|
||||||
private GameObject currentChip;
|
|
||||||
private Canvas canvas;
|
|
||||||
|
|
||||||
void Start()
|
|
||||||
{
|
|
||||||
// Get the RectTransform component of the canvas
|
|
||||||
canvasRect = GetComponentInParent<Canvas>().GetComponent<RectTransform>();
|
|
||||||
// Get the Canvas component of the parent object
|
|
||||||
canvas = GetComponentInParent<Canvas>();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void OnBeginDrag(PointerEventData eventData)
|
|
||||||
{
|
|
||||||
// Create a clone of the chip image at the current position
|
|
||||||
currentChip = Instantiate(chipPrefab, transform.position, Quaternion.identity, canvas.transform);
|
|
||||||
// Get the RectTransform component of the clone
|
|
||||||
chipRect = currentChip.GetComponent<RectTransform>();
|
|
||||||
// Store the original position of the clone before dragging
|
|
||||||
originalPosition = chipRect.anchoredPosition;
|
|
||||||
// Bring the clone to the front
|
|
||||||
chipRect.SetAsLastSibling();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void OnDrag(PointerEventData eventData)
|
|
||||||
{
|
|
||||||
// Move the clone with the mouse drag movement
|
|
||||||
chipRect.anchoredPosition += eventData.delta / canvas.scaleFactor;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void OnEndDrag(PointerEventData eventData)
|
|
||||||
{
|
|
||||||
// If the clone exists, check if it's dropped onto the roulette board image
|
|
||||||
if (currentChip != null)
|
|
||||||
{
|
|
||||||
RectTransform boardRect = rouletteBoardImage.GetComponent<RectTransform>();
|
|
||||||
Vector2 localMousePos;
|
|
||||||
// Check if the mouse position is within the bounds of the roulette board image
|
|
||||||
if (RectTransformUtility.ScreenPointToLocalPointInRectangle(boardRect, Input.mousePosition, canvas.worldCamera, out localMousePos))
|
|
||||||
{
|
|
||||||
if (boardRect.rect.Contains(localMousePos))
|
|
||||||
{
|
|
||||||
// If the chip is dropped onto the roulette board image, set its parent to the image and position it at the mouse cursor
|
|
||||||
chipRect.SetParent(rouletteBoardImage.transform);
|
|
||||||
chipRect.anchoredPosition = localMousePos;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// If the chip is dropped outside of the roulette board image, destroy it
|
|
||||||
Destroy(currentChip);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// If the mouse position is not within the bounds of the canvas, destroy the clone
|
|
||||||
Destroy(currentChip);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set the clone to null to indicate that it no longer exists
|
|
||||||
currentChip = null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -8,6 +8,23 @@ public class RouletteManager : MonoBehaviour
|
||||||
private static float moneyAvailable = 1000;
|
private static float moneyAvailable = 1000;
|
||||||
public static float MoneyAvailable {get{ return moneyAvailable;} set{OnMoneyAvailablChanged.Invoke(value); moneyAvailable = value;}}
|
public static float MoneyAvailable {get{ return moneyAvailable;} set{OnMoneyAvailablChanged.Invoke(value); moneyAvailable = value;}}
|
||||||
public static UnityEvent<float> OnMoneyAvailablChanged = new UnityEvent<float>();
|
public static UnityEvent<float> OnMoneyAvailablChanged = new UnityEvent<float>();
|
||||||
|
|
||||||
|
public static Dictionary<float, Chip> chipsBoard {get; private set;}
|
||||||
|
public static void RegisterChip(Chip chip){
|
||||||
|
if(chipsBoard == null){chipsBoard = new Dictionary<float, Chip>();}
|
||||||
|
|
||||||
|
chipsBoard.Add(chip.value, chip);
|
||||||
|
selectedChipChanged.AddListener(chip.OnSelectedChanged);
|
||||||
|
chip.OnSelectedChanged(SelectedChip);
|
||||||
|
}
|
||||||
|
public static UnityEvent<float> selectedChipChanged = new UnityEvent<float>();
|
||||||
|
private static float m_selectedChip = 0.2f;
|
||||||
|
public static float SelectedChip { get{ return m_selectedChip; } set{
|
||||||
|
m_selectedChip = value;
|
||||||
|
selectedChipChanged.Invoke(value);
|
||||||
|
}}
|
||||||
|
public static int[] RouletteNumbers = {0,32,15,19,4,21,2,25,17,34,6,27,13,36,11,30,8,23,10,5,24,16,33,1,20,14,31,9,22,18,29,7,28,12,35,3,26};
|
||||||
|
public static List<int> Reds = new List<int>(){1,3,5,7,9,12,14,16,18,19,21,23,25,27,30,32,34,36};
|
||||||
|
|
||||||
|
|
||||||
void Start()
|
void Start()
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@ public class Spinner : MonoBehaviour
|
||||||
public float SpinForce = 10;
|
public float SpinForce = 10;
|
||||||
[Tooltip("How smooth the speed goes up")]
|
[Tooltip("How smooth the speed goes up")]
|
||||||
public float SpinSmoothness = 1f;
|
public float SpinSmoothness = 1f;
|
||||||
|
public float SpinSmoothnessMax = 1f;
|
||||||
[Tooltip("How smooth the speed goes down")]
|
[Tooltip("How smooth the speed goes down")]
|
||||||
public float Friction = 0.005f;
|
public float Friction = 0.005f;
|
||||||
[Tooltip("When should the wheel stop")]
|
[Tooltip("When should the wheel stop")]
|
||||||
|
|
@ -27,7 +28,7 @@ public class Spinner : MonoBehaviour
|
||||||
|
|
||||||
void Start()
|
void Start()
|
||||||
{
|
{
|
||||||
Debug.Log(RouletteNumbers.Length);
|
Debug.Log(RouletteManager.RouletteNumbers.Length);
|
||||||
}
|
}
|
||||||
bool pushing = false;
|
bool pushing = false;
|
||||||
// Update is called once per frame
|
// Update is called once per frame
|
||||||
|
|
@ -55,14 +56,15 @@ public class Spinner : MonoBehaviour
|
||||||
|
|
||||||
IEnumerator spin(){
|
IEnumerator spin(){
|
||||||
pushing=true;
|
pushing=true;
|
||||||
|
numText.text ="";
|
||||||
|
float m_spinSmoothness = Random.Range(SpinSmoothness, SpinSmoothnessMax);
|
||||||
while(CurrentSpeed < SpinForce){
|
while(CurrentSpeed < SpinForce){
|
||||||
CurrentSpeed += SpinSmoothness;
|
CurrentSpeed += m_spinSmoothness;
|
||||||
yield return new WaitForFixedUpdate();
|
yield return new WaitForFixedUpdate();
|
||||||
}
|
}
|
||||||
pushing = false;
|
pushing = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int[] RouletteNumbers = {0,32,15,19,4,21,2,25,17,34,6,27,13,36,11,30,8,23,10,5,24,16,33,1,20,14,31,9,22,18,29,7,28,12,35,3,26};
|
|
||||||
|
|
||||||
private void m_onSpinStopped(){
|
private void m_onSpinStopped(){
|
||||||
|
|
||||||
|
|
@ -76,14 +78,14 @@ public class Spinner : MonoBehaviour
|
||||||
}
|
}
|
||||||
|
|
||||||
int GetLandedNumber(){
|
int GetLandedNumber(){
|
||||||
float fraction = ((wheel.eulerAngles.z) / 360f) * (float)RouletteNumbers.Length;
|
float fraction = ((wheel.eulerAngles.z) / 360f) * (float)RouletteManager.RouletteNumbers.Length;
|
||||||
int index= Mathf.RoundToInt(fraction) + offset;
|
int index= Mathf.RoundToInt(fraction) + offset;
|
||||||
if(index < 0){
|
if(index < 0){
|
||||||
index = RouletteNumbers.Length + index - 1;
|
index = RouletteManager.RouletteNumbers.Length + index - 1;
|
||||||
}else if(index >= RouletteNumbers.Length){
|
}else if(index >= RouletteManager.RouletteNumbers.Length){
|
||||||
index = index - RouletteNumbers.Length;
|
index = index - RouletteManager.RouletteNumbers.Length;
|
||||||
}
|
}
|
||||||
int m_LandedNumber = RouletteNumbers[index];
|
int m_LandedNumber = RouletteManager.RouletteNumbers[index];
|
||||||
|
|
||||||
return m_LandedNumber;
|
return m_LandedNumber;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -1,4 +1,15 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
|
"scopedRegistries": [
|
||||||
|
{
|
||||||
|
"name": "package.openupm.com",
|
||||||
|
"url": "https://package.openupm.com",
|
||||||
|
"scopes": [
|
||||||
|
"com.madsbangh.easybuttons",
|
||||||
|
"com.openupm"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"com.unity.collab-proxy": "2.0.0",
|
"com.unity.collab-proxy": "2.0.0",
|
||||||
"com.unity.feature.2d": "1.0.0",
|
"com.unity.feature.2d": "1.0.0",
|
||||||
|
|
@ -41,6 +52,7 @@
|
||||||
"com.unity.modules.video": "1.0.0",
|
"com.unity.modules.video": "1.0.0",
|
||||||
"com.unity.modules.vr": "1.0.0",
|
"com.unity.modules.vr": "1.0.0",
|
||||||
"com.unity.modules.wind": "1.0.0",
|
"com.unity.modules.wind": "1.0.0",
|
||||||
"com.unity.modules.xr": "1.0.0"
|
"com.unity.modules.xr": "1.0.0",
|
||||||
|
"com.madsbangh.easybuttons": "1.3.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,12 @@
|
||||||
{
|
{
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"com.madsbangh.easybuttons": {
|
||||||
|
"version": "1.3.0",
|
||||||
|
"depth": 0,
|
||||||
|
"source": "registry",
|
||||||
|
"dependencies": {},
|
||||||
|
"url": "https://package.openupm.com"
|
||||||
|
},
|
||||||
"com.unity.2d.animation": {
|
"com.unity.2d.animation": {
|
||||||
"version": "7.0.2",
|
"version": "7.0.2",
|
||||||
"depth": 1,
|
"depth": 1,
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ MonoBehaviour:
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
m_EnablePreReleasePackages: 0
|
m_EnablePreReleasePackages: 0
|
||||||
m_EnablePackageDependencies: 0
|
m_EnablePackageDependencies: 1
|
||||||
m_AdvancedSettingsExpanded: 1
|
m_AdvancedSettingsExpanded: 1
|
||||||
m_ScopedRegistriesSettingsExpanded: 1
|
m_ScopedRegistriesSettingsExpanded: 1
|
||||||
m_SeeAllPackageVersions: 0
|
m_SeeAllPackageVersions: 0
|
||||||
|
|
@ -25,20 +25,19 @@ MonoBehaviour:
|
||||||
m_Scopes: []
|
m_Scopes: []
|
||||||
m_IsDefault: 1
|
m_IsDefault: 1
|
||||||
m_Capabilities: 7
|
m_Capabilities: 7
|
||||||
m_UserSelectedRegistryName:
|
- m_Id: scoped:package.openupm.com
|
||||||
|
m_Name: package.openupm.com
|
||||||
|
m_Url: https://package.openupm.com
|
||||||
|
m_Scopes:
|
||||||
|
- com.madsbangh.easybuttons
|
||||||
|
- com.openupm
|
||||||
|
m_IsDefault: 0
|
||||||
|
m_Capabilities: 0
|
||||||
|
m_UserSelectedRegistryName: package.openupm.com
|
||||||
m_UserAddingNewScopedRegistry: 0
|
m_UserAddingNewScopedRegistry: 0
|
||||||
m_RegistryInfoDraft:
|
m_RegistryInfoDraft:
|
||||||
m_ErrorMessage:
|
|
||||||
m_Original:
|
|
||||||
m_Id:
|
|
||||||
m_Name:
|
|
||||||
m_Url:
|
|
||||||
m_Scopes: []
|
|
||||||
m_IsDefault: 0
|
|
||||||
m_Capabilities: 0
|
|
||||||
m_Modified: 0
|
m_Modified: 0
|
||||||
m_Name:
|
m_ErrorMessage:
|
||||||
m_Url:
|
m_UserModificationsInstanceId: -824
|
||||||
m_Scopes:
|
m_OriginalInstanceId: -826
|
||||||
-
|
m_LoadAssets: 0
|
||||||
m_SelectedScopeIndex: 0
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user