修复bug,投注,加弹窗
This commit is contained in:
parent
5ae084489a
commit
cfb551ceba
@ -263,9 +263,10 @@ RectTransform:
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 765264826735215916}
|
||||
- {fileID: 6513331808359434703}
|
||||
- {fileID: 6513331809022104673}
|
||||
- {fileID: 6513331809230359520}
|
||||
- {fileID: 6513331808359434703}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
@ -302,7 +303,7 @@ MonoBehaviour:
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 21300000, guid: bbb9ec49207c9d842a5cbf8ef2562e88, type: 3}
|
||||
m_Sprite: {fileID: 21300000, guid: 1ae7046112095d8499665a5adad27fd8, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
@ -709,7 +710,7 @@ RectTransform:
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 6513331807595845951}
|
||||
m_RootOrder: 2
|
||||
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}
|
||||
@ -940,7 +941,7 @@ RectTransform:
|
||||
m_Children:
|
||||
- {fileID: 6513331807259215441}
|
||||
m_Father: {fileID: 6513331807595845951}
|
||||
m_RootOrder: 0
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
@ -1062,10 +1063,86 @@ RectTransform:
|
||||
- {fileID: 6513331807472238649}
|
||||
- {fileID: 6513331808063889395}
|
||||
m_Father: {fileID: 6513331807595845951}
|
||||
m_RootOrder: 1
|
||||
m_RootOrder: 3
|
||||
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: 177}
|
||||
m_SizeDelta: {x: 1105, y: 323}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!1 &7867649464962025816
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 765264826735215916}
|
||||
- component: {fileID: 4437702292336655386}
|
||||
- component: {fileID: 7884033650712449137}
|
||||
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 &765264826735215916
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7867649464962025816}
|
||||
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: 6513331807595845951}
|
||||
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: 56}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &4437702292336655386
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7867649464962025816}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &7884033650712449137
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7867649464962025816}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 2100000, guid: bfcd795f1f359a64d80bf34e0ad8485d, type: 2}
|
||||
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: 321f6688d2596764aaec07461e14a806, 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
|
||||
|
159
TheStrongestSnail/Assets/Resources/Popups.prefab
Normal file
159
TheStrongestSnail/Assets/Resources/Popups.prefab
Normal file
@ -0,0 +1,159 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &1824928085711359295
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1824928085711359292}
|
||||
- component: {fileID: 1824928085711359282}
|
||||
- component: {fileID: 1824928085711359293}
|
||||
m_Layer: 5
|
||||
m_Name: Text
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1824928085711359292
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1824928085711359295}
|
||||
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: 1824928085789369227}
|
||||
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: 8.8, y: -0.00029373}
|
||||
m_SizeDelta: {x: 798.15, y: 98.805}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &1824928085711359282
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1824928085711359295}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &1824928085711359293
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1824928085711359295}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, 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_FontData:
|
||||
m_Font: {fileID: 12800000, guid: bf1c9e1bcf09e2a4dba44bbe6cc2ba38, type: 3}
|
||||
m_FontSize: 52
|
||||
m_FontStyle: 1
|
||||
m_BestFit: 1
|
||||
m_MinSize: 10
|
||||
m_MaxSize: 52
|
||||
m_Alignment: 4
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 0
|
||||
m_VerticalOverflow: 0
|
||||
m_LineSpacing: 1
|
||||
m_Text: New Text
|
||||
--- !u!1 &1824928085789369226
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1824928085789369227}
|
||||
- component: {fileID: 1824928085789369225}
|
||||
- component: {fileID: 1824928085789369224}
|
||||
m_Layer: 5
|
||||
m_Name: Popups
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1824928085789369227
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1824928085789369226}
|
||||
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: 1824928085711359292}
|
||||
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: 0, y: 701.40283}
|
||||
m_SizeDelta: {x: 815.7513, y: 98.8058}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &1824928085789369225
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1824928085789369226}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &1824928085789369224
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1824928085789369226}
|
||||
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: 3a69b00d0ef77d14da29a04479e6d1c6, 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
|
7
TheStrongestSnail/Assets/Resources/Popups.prefab.meta
Normal file
7
TheStrongestSnail/Assets/Resources/Popups.prefab.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2fdb15d8b9c72ad4a88e6b403babdf66
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
207
TheStrongestSnail/Assets/Resources/otherWoniu.prefab
Normal file
207
TheStrongestSnail/Assets/Resources/otherWoniu.prefab
Normal file
@ -0,0 +1,207 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &4217838679404656796
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4217838679404656799}
|
||||
- component: {fileID: 4217838679404656789}
|
||||
- component: {fileID: 4217838679404656794}
|
||||
- component: {fileID: 4217838679404656795}
|
||||
- component: {fileID: 4217838679404656792}
|
||||
- component: {fileID: 4217838679404656793}
|
||||
- component: {fileID: 4217838679404656788}
|
||||
m_Layer: 5
|
||||
m_Name: otherWoniu
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &4217838679404656799
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4217838679404656796}
|
||||
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: 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: -297, y: 36}
|
||||
m_SizeDelta: {x: 100, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &4217838679404656789
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4217838679404656796}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &4217838679404656794
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4217838679404656796}
|
||||
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: 401e962f1955e704991d93e3394fd80e, 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
|
||||
--- !u!114 &4217838679404656795
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4217838679404656796}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: c98ebd0127009a94cbf2e9ba48bd8388, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
StartPos: {fileID: 0}
|
||||
CurrentPos: {fileID: 0}
|
||||
StartIndex: 0
|
||||
HadChoise: 0
|
||||
Parent: {fileID: 0}
|
||||
IsReturn: 0
|
||||
PlayAni: {fileID: 4217838679404656793}
|
||||
IsLeft: 0
|
||||
HouseId: 0
|
||||
--- !u!114 &4217838679404656792
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4217838679404656796}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 0a691aaaa3074ac4d823aa67ebc1b2b0, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
objectToMove: {fileID: 4217838679404656799}
|
||||
pathPoints:
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
duration: 5
|
||||
isLooping: 0
|
||||
room_id:
|
||||
Speed: 5
|
||||
EndPos: {fileID: 0}
|
||||
TypeEndPos0: {fileID: 0}
|
||||
TypeEndPos1: {fileID: 0}
|
||||
TypeEndPos2: {fileID: 0}
|
||||
TypeEndPos3: {fileID: 0}
|
||||
TypeEndPos4: {fileID: 0}
|
||||
TypeEndPos5: {fileID: 0}
|
||||
TypeEndPos6: {fileID: 0}
|
||||
JumpPos: {fileID: 0}
|
||||
Pos1Parent: {fileID: 0}
|
||||
Pos2Parent: {fileID: 0}
|
||||
Pos3Parent: {fileID: 0}
|
||||
Pos4Parent: {fileID: 0}
|
||||
Pos5Parent: {fileID: 0}
|
||||
Pos6Parent: {fileID: 0}
|
||||
OutParent: {fileID: 0}
|
||||
ReturnPos: {fileID: 0}
|
||||
IsBoos: 0
|
||||
allHouseContro: {fileID: 0}
|
||||
SelfTextTrans: {fileID: 0}
|
||||
SelfImage: {fileID: 0}
|
||||
IsOtherWoniu: 1
|
||||
--- !u!95 &4217838679404656793
|
||||
Animator:
|
||||
serializedVersion: 5
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4217838679404656796}
|
||||
m_Enabled: 1
|
||||
m_Avatar: {fileID: 0}
|
||||
m_Controller: {fileID: 9100000, guid: 8b455eef72c374e449424b7285f3e678, type: 2}
|
||||
m_CullingMode: 0
|
||||
m_UpdateMode: 0
|
||||
m_ApplyRootMotion: 0
|
||||
m_LinearVelocityBlending: 0
|
||||
m_StabilizeFeet: 0
|
||||
m_WarningMessage:
|
||||
m_HasTransformHierarchy: 1
|
||||
m_AllowConstantClipSamplingOptimization: 1
|
||||
m_KeepAnimatorStateOnDisable: 0
|
||||
m_WriteDefaultValuesOnDisable: 0
|
||||
--- !u!114 &4217838679404656788
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4217838679404656796}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 0ab200c063ec6704eaa1b8951e7c8ff9, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
EndPosList:
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
WaitingArea: {fileID: 0}
|
||||
bossContros:
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
OrPosTrams: {fileID: 0}
|
||||
Panrent: {fileID: 0}
|
||||
allHouseContros: {fileID: 0}
|
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cb258e284be1975488c77564b0cadd91
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
File diff suppressed because it is too large
Load Diff
@ -2331,6 +2331,7 @@ GameObject:
|
||||
- component: {fileID: 667894481}
|
||||
- component: {fileID: 667894480}
|
||||
- component: {fileID: 667894479}
|
||||
- component: {fileID: 667894483}
|
||||
m_Layer: 5
|
||||
m_Name: Canvas
|
||||
m_TagString: Untagged
|
||||
@ -2423,6 +2424,21 @@ RectTransform:
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0, y: 0}
|
||||
--- !u!114 &667894483
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 667894478}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 57e5147ed4aa884499713edeaa5cb4c7, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
PromptPrefab: {fileID: 0}
|
||||
canvs: {fileID: 667894478}
|
||||
protext: {fileID: 0}
|
||||
--- !u!1 &705507993
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -3615,7 +3631,7 @@ RectTransform:
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 686, y: -1387.5}
|
||||
m_AnchoredPosition: {x: 540, y: -1339.5}
|
||||
m_SizeDelta: {x: 1018, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1071890038
|
||||
|
@ -7,6 +7,8 @@ using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using UnityEngine.Windows;
|
||||
using static BettingBtn;
|
||||
using static UnityEditor.Progress;
|
||||
|
||||
|
||||
public class AllHouseContro : MonoBehaviour
|
||||
@ -53,6 +55,10 @@ public class AllHouseContro : MonoBehaviour
|
||||
{
|
||||
item.gameObject.GetComponentInChildren<Button>().onClick.RemoveAllListeners();
|
||||
item.gameObject.GetComponentInChildren<Button>().onClick.AddListener(item.OnClickBtn);
|
||||
//item.gameObject.GetComponentInChildren<Button>().onClick.AddListener(() => {
|
||||
// roomNo = item.roomNo;
|
||||
|
||||
//});
|
||||
//item.wn.GetComponent<wuniusj>().show();
|
||||
}
|
||||
|
||||
@ -77,6 +83,7 @@ public class AllHouseContro : MonoBehaviour
|
||||
HouseBtn a = HouseBtnList[index];
|
||||
HouseBtnList[index].gameObject.GetComponentInChildren<Button>().onClick.AddListener(() => {
|
||||
roomNo = item.roomNo;
|
||||
Debug.Log("所在房间Id"+roomNo);
|
||||
Debug.Log(a.gameObject.name);
|
||||
house = a;
|
||||
Debug.Log("=====-----" + item.roomNo.ToString());
|
||||
@ -91,25 +98,73 @@ public class AllHouseContro : MonoBehaviour
|
||||
}
|
||||
public bool is_jisha = false;
|
||||
public bool is_jisha_jiesuan = false;
|
||||
|
||||
public async void touzhu()
|
||||
{
|
||||
RequestData body = new RequestData();
|
||||
body.escapeId = escapeId;
|
||||
body.bet = PlayerInfo.instance.AllBetCoins;
|
||||
body.roomNo = roomNo;
|
||||
Debug.Log("切换始roomNo" + body.roomNo);
|
||||
body.userId = Global.global.serverResponse.data.userId;
|
||||
|
||||
|
||||
string response = await web.SendRequest(web.URL + "/snail/gameEscape/userBet", "POST", JsonUtility.ToJson(body), Global.global.CreateHeaders());
|
||||
Debug.Log("用户切换下注响应: " + response + "|||||" + "请求参数:escapeId" + body.escapeId + " bet:" + body.bet + " roomNo:" + body.roomNo + " userId:" + body.userId);
|
||||
ServerResponse513 serverResponse_513 = JsonConvert.DeserializeObject<ServerResponse513>(response);
|
||||
if (serverResponse_513.code == 200)
|
||||
{
|
||||
//SuccessBet = true;
|
||||
Debug.Log("-------切换投注成功-------");
|
||||
checkOutAllTheEscapeRoomsAsync();//5.1.2
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("-------切换投注失败-------");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public async void checkOutAllTheEscapeRoomsAsync()//5.1.2
|
||||
{
|
||||
|
||||
foreach (HouseBtn house in HouseBtnList)
|
||||
{
|
||||
house.GetComponentInChildren<Button>().onClick.AddListener(() => {
|
||||
roomNo = house.roomNo;
|
||||
Debug.Log("所在房间Id" + roomNo);
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
//GetInfo516();
|
||||
//Debug.Log("===");
|
||||
userIDgameId body = new userIDgameId();
|
||||
body.userId = Global.global.serverResponse.data.userId;
|
||||
body.escapeId = escapeId;
|
||||
|
||||
|
||||
string response = await web.SendRequest(web.URL+"/snail/gameEscape/queryEscapeRoomList", "POST", JsonUtility.ToJson(body), Global.global.CreateHeaders());
|
||||
Debug.Log("5.1.2查询逃亡房间 请求:"+ JsonUtility.ToJson(body) +" 详情响应: " + response);
|
||||
ServerResponse serverResponse = JsonConvert.DeserializeObject<ServerResponse>(response);
|
||||
int index = 0;
|
||||
//int index = 0;
|
||||
foreach (var item in serverResponse.data.gameEscapeRoomResponseVoList){
|
||||
if (HouseBtnList.Count > index)
|
||||
foreach (HouseBtn houseBtn in HouseBtnList)
|
||||
{
|
||||
HouseBtnList[index].text.GetComponentInChildren<TextBox>().SetText(item.roomBeansCoin);
|
||||
if (houseBtn.roomNo==item.roomNo)
|
||||
{
|
||||
houseBtn.roomBeansCoin = item.roomBeansCoin;
|
||||
houseBtn.text.GetComponentInChildren<TextBox>().SetText(item.roomBeansCoin);
|
||||
|
||||
}
|
||||
}
|
||||
//if (HouseBtnList.Count > index)
|
||||
//{
|
||||
|
||||
// HouseBtnList[index].text.GetComponentInChildren<TextBox>().SetText(item.roomBeansCoin);
|
||||
//}
|
||||
|
||||
index++;
|
||||
//index++;
|
||||
}
|
||||
Debug.Log("更新房间蜗牛蛋");
|
||||
if(serverResponse.data.carrySeconds == -1)
|
||||
@ -122,7 +177,7 @@ public class AllHouseContro : MonoBehaviour
|
||||
battleRoyaleGameDetails();
|
||||
LoadPanel.instance.ShowPanel();
|
||||
GetInfo516();
|
||||
|
||||
PlayerInfo.instance.AllBetCoins = 0;//投注归0
|
||||
}
|
||||
else if (serverResponse.data.carrySeconds < 45){
|
||||
//ClearBoosHouseId();//清空boos房间号
|
||||
@ -135,7 +190,8 @@ public class AllHouseContro : MonoBehaviour
|
||||
|
||||
if (!HaveallotherMove)
|
||||
{
|
||||
StartCoroutine(allother.WoniuToMove());
|
||||
//StartCoroutine(allother.WoniuToMove());
|
||||
allother.CreateWoniu();
|
||||
HaveallotherMove = true;
|
||||
//其他蜗牛进笼子
|
||||
}
|
||||
|
@ -5,8 +5,11 @@ using UnityEngine;
|
||||
|
||||
public class Allother : MonoBehaviour
|
||||
{
|
||||
public List<otherWoniu> otherWonius;
|
||||
|
||||
public List<otherWoniu> otherWonius=new List<otherWoniu>();
|
||||
|
||||
public List<HouseBtn> House;//蜗牛进入的父物体
|
||||
public GameObject OtherWoniuPre;//其他蜗牛预制体
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
@ -14,22 +17,39 @@ public class Allother : MonoBehaviour
|
||||
//StartCoroutine(WoniuToMove());
|
||||
}
|
||||
|
||||
public IEnumerator WoniuToMove()
|
||||
{
|
||||
foreach (otherWoniu item in otherWonius)
|
||||
{
|
||||
yield return new WaitForSeconds(0.5f);
|
||||
item.OtherWoniuMove();
|
||||
//public IEnumerator WoniuToMove()
|
||||
//{
|
||||
// CreateWoniu();//创建蜗牛
|
||||
|
||||
}
|
||||
}
|
||||
public async void ControWoniuToMove()
|
||||
{
|
||||
foreach (otherWoniu item in otherWonius)
|
||||
{
|
||||
await Task.Delay(1000);
|
||||
item.OtherWoniuMove();
|
||||
//}
|
||||
//public async void ControWoniuToMove()
|
||||
// {
|
||||
// foreach (otherWoniu item in otherWonius)
|
||||
// {
|
||||
// await Task.Delay(1000);
|
||||
// item.OtherWoniuMove();
|
||||
|
||||
// }
|
||||
// }
|
||||
|
||||
//蜗牛全部刷新到笼子里面
|
||||
public void RefrashAllWoniu()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void CreateWoniu()
|
||||
{
|
||||
foreach (HouseBtn house in House)
|
||||
{
|
||||
for (int i = 0; i < house.roomUserNo; i++)
|
||||
{
|
||||
GameObject ot=Instantiate(OtherWoniuPre, transform);
|
||||
otherWonius.Add(ot.GetComponent<otherWoniu>());
|
||||
ot.GetComponent<otherWoniu>().OtherWoniuMove(house.roomNo);//进房间
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -1,3 +1,5 @@
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
@ -30,6 +32,8 @@ public class BettingBtn : MonoBehaviour
|
||||
|
||||
public List<GameObject> list=new List<GameObject>();
|
||||
public TextMeshProUGUI SelfWoniuText;
|
||||
|
||||
public bool SuccessBet;//是否成功下注
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
@ -56,40 +60,73 @@ public class BettingBtn : MonoBehaviour
|
||||
public GameObject bg;
|
||||
public async void OnClickBetBtnAsync()
|
||||
{
|
||||
PlayerInfo.instance.HaveBet = true;
|
||||
// bg.GetComponentInChildren<AllHouseContro>().battleRoyaleGameDetails();
|
||||
|
||||
|
||||
RequestData body = new RequestData();
|
||||
body.escapeId = bg.GetComponentInChildren<AllHouseContro>().escapeId;
|
||||
body.bet = BetValue;
|
||||
body.roomNo = bg.GetComponentInChildren<AllHouseContro>().roomNo;
|
||||
body.userId = Global.global.serverResponse.data.userId;
|
||||
Debug.Log(bg.GetComponentInChildren<AllHouseContro>().house);
|
||||
bg.GetComponentInChildren<AllHouseContro>().house.text.GetComponent<TextBox>().AddText(BetValue);
|
||||
PlayerInfo.instance.AllBetCoins += BetValue;
|
||||
StartCoroutine(Tools.AnimateTextMashPro(PlayerInfo.instance.AllBetCoins, PlayerInfo.instance.AllBetCoins + BetValue, 0.5f, SelfWoniuText));//修改蜗牛头上文本
|
||||
//Debug.Log(bg.GetComponentInChildren<AllHouseContro>().house);
|
||||
//bg.GetComponentInChildren<AllHouseContro>().house.text.GetComponent<TextBox>().AddText(BetValue);
|
||||
|
||||
|
||||
string response = await web.SendRequest(web.URL + "/snail/gameEscape/userBet", "POST", JsonUtility.ToJson(body), Global.global.CreateHeaders());
|
||||
Debug.Log("用户下注响应: " + response);
|
||||
bg.GetComponentInChildren<AllHouseContro>().battleRoyaleGameDetails();
|
||||
bg.GetComponentInChildren<AllHouseContro>().checkOutAllTheEscapeRoomsAsync();//5.1.2
|
||||
//调用玩家信息,更新左上角蜗蛋数量
|
||||
playerCoinUpdate.QueryPlayerInfo();
|
||||
Debug.Log("用户下注响应: " + response+"|||||"+"请求参数:escapeId"+ body.escapeId+" bet:"+ body.bet+ " roomNo:"+ body.roomNo+" userId:"+ body.userId);
|
||||
ServerResponse513 serverResponse_513 = JsonConvert.DeserializeObject<ServerResponse513>(response);
|
||||
if (serverResponse_513.code==200)
|
||||
{
|
||||
bg.GetComponentInChildren<AllHouseContro>().checkOutAllTheEscapeRoomsAsync();//5.1.2
|
||||
StartCoroutine(Tools.AnimateTextMashPro(PlayerInfo.instance.AllBetCoins, PlayerInfo.instance.AllBetCoins + BetValue, 0.5f, SelfWoniuText));//修改蜗牛头上文本
|
||||
PlayerInfo.instance.AllBetCoins += BetValue;
|
||||
PlayerInfo.instance.HaveBet = true;
|
||||
|
||||
//调用玩家信息,更新左上角蜗蛋数量
|
||||
playerCoinUpdate.QueryPlayerInfo();
|
||||
Debug.Log("-------投注成功-------");
|
||||
Promptmgr.Instance.PromptBubble(serverResponse_513.message);
|
||||
}
|
||||
else {
|
||||
Debug.Log("-------投注失败-------");
|
||||
Promptmgr.Instance.PromptBubble(serverResponse_513.message);
|
||||
}
|
||||
|
||||
Debug.Log("µã»÷ÁËÏÂ×¢°´Å¥================================================" + playerCoinUpdate.Money);
|
||||
|
||||
}
|
||||
|
||||
public async void BetAgain()
|
||||
public async void BetAgain(Action onComplete=null)
|
||||
{
|
||||
bg.GetComponentInChildren<AllHouseContro>().battleRoyaleGameDetails();
|
||||
//bg.GetComponentInChildren<AllHouseContro>().battleRoyaleGameDetails();
|
||||
|
||||
|
||||
RequestData body = new RequestData();
|
||||
body.escapeId = bg.GetComponentInChildren<AllHouseContro>().escapeId;
|
||||
body.bet = PlayerInfo.instance.AllBetCoins;
|
||||
//body.bet = PlayerInfo.instance.AllBetCoins;
|
||||
body.bet = 0;
|
||||
body.roomNo = bg.GetComponentInChildren<AllHouseContro>().roomNo;
|
||||
|
||||
body.userId = Global.global.serverResponse.data.userId;
|
||||
|
||||
|
||||
|
||||
string response = await web.SendRequest(web.URL + "/snail/gameEscape/userBet", "POST", JsonUtility.ToJson(body), Global.global.CreateHeaders());
|
||||
Debug.Log("用户下注响应: " + response);
|
||||
|
||||
bg.GetComponentInChildren<AllHouseContro>().checkOutAllTheEscapeRoomsAsync();//5.1.2
|
||||
Debug.Log("用户切换下注响应: " + response + "|||||" + "请求参数:escapeId" + body.escapeId + " bet:" + body.bet + " roomNo:" + body.roomNo + " userId:" + body.userId);
|
||||
ServerResponse513 serverResponse_513 = JsonConvert.DeserializeObject<ServerResponse513>(response);
|
||||
if (serverResponse_513.code == 200)
|
||||
{
|
||||
|
||||
Debug.Log("-------切换投注成功-------");
|
||||
Promptmgr.Instance.PromptBubble(serverResponse_513.message);
|
||||
onComplete?.Invoke();
|
||||
bg.GetComponentInChildren<AllHouseContro>().checkOutAllTheEscapeRoomsAsync();//5.1.2
|
||||
}
|
||||
else
|
||||
{
|
||||
Promptmgr.Instance.PromptBubble(serverResponse_513.message);
|
||||
Debug.Log("-------切换投注失败-------");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void SetBet()
|
||||
|
@ -8,16 +8,18 @@ public class HouseBtn : MonoBehaviour
|
||||
public int escapeId;//游戏id
|
||||
public int roomNo;//房间号
|
||||
public float roomBeansCoin;//房间里面的钱
|
||||
public int roomUserNo;//房间里面的人数
|
||||
public Button btn;
|
||||
public GameObject Mask;
|
||||
public RectTransform door;
|
||||
public GameObject text;
|
||||
public GameObject post;
|
||||
public GameObject post;//最终点
|
||||
public GameObject bg;
|
||||
public GameObject wn;
|
||||
//public selectLatest511.GameEscapeRoomResponseVo gameEscapeRoomResponseVo;
|
||||
public bool DoorIsOpen;
|
||||
public PlayerMovePos woniuMovePos;
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
@ -32,17 +34,36 @@ public class HouseBtn : MonoBehaviour
|
||||
|
||||
public void OnClickBtn()
|
||||
{
|
||||
|
||||
|
||||
if (!bg.GetComponent<AllHouseContro>().is_jisha)
|
||||
{
|
||||
Debug.Log("————————————————选择房间——————————————");
|
||||
transform.GetComponent<PlayerMove>().StartMove();
|
||||
woniuMovePos.HadChoise = true;
|
||||
if (PlayerInfo.instance.HaveBet)
|
||||
{
|
||||
if (bg.GetComponent<AllHouseContro>().roomNo!=roomNo)
|
||||
{
|
||||
bg.GetComponent<AllHouseContro>().roomNo = roomNo;
|
||||
BettingBtn.instance.BetAgain(() => {
|
||||
transform.GetComponent<PlayerMove>().StartMove();
|
||||
woniuMovePos.HadChoise = true;
|
||||
});//再次投注,换房子
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
transform.GetComponent<PlayerMove>().StartMove();
|
||||
woniuMovePos.HadChoise = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (PlayerInfo.instance.HaveBet)
|
||||
{
|
||||
BettingBtn.instance.BetAgain();//再次投注,换房子
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
262
TheStrongestSnail/Assets/Scripts/Battle_Royale/OtherMove.cs
Normal file
262
TheStrongestSnail/Assets/Scripts/Battle_Royale/OtherMove.cs
Normal file
@ -0,0 +1,262 @@
|
||||
using DG.Tweening;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class OtherMove : MonoBehaviour
|
||||
{
|
||||
public Transform objectToMove; // 要移动的对象
|
||||
public Transform[] pathPoints; // 路径上的点的数组
|
||||
public float duration = 5f; // 移动的持续时间
|
||||
public bool isLooping = false; // 是否循环路径
|
||||
int startIndex = 0;
|
||||
int endIndex = 0;
|
||||
public string room_id;
|
||||
public float Speed;
|
||||
public Transform EndPos;
|
||||
|
||||
|
||||
|
||||
public Transform Pos1Parent;
|
||||
public Transform Pos2Parent;
|
||||
public Transform Pos3Parent;
|
||||
public Transform Pos4Parent;
|
||||
public Transform Pos5Parent;
|
||||
public Transform Pos6Parent;
|
||||
|
||||
public Transform OutParent;
|
||||
|
||||
public Transform ReturnPos;//返回的位置
|
||||
|
||||
public bool IsBoos;
|
||||
|
||||
public AllHouseContro allHouseContro;
|
||||
|
||||
public Transform SelfTextTrans;
|
||||
public Transform SelfImage;
|
||||
public bool IsOtherWoniu;
|
||||
private void Start()
|
||||
{
|
||||
Speed = 2f;
|
||||
|
||||
|
||||
|
||||
}
|
||||
public void MoveOutParent()
|
||||
{
|
||||
// 记录原始的父物体
|
||||
|
||||
|
||||
// 将 childObject 设为新的 parentObject 的子节点,并放到最后一个位置
|
||||
objectToMove.SetParent(OutParent);
|
||||
objectToMove.SetAsLastSibling();
|
||||
|
||||
|
||||
}
|
||||
public void MoveInParent(Transform Parent)
|
||||
{
|
||||
objectToMove.SetParent(Parent);
|
||||
objectToMove.SetAsFirstSibling();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public void SetParentToHouse()
|
||||
{
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void ReturnStartPos()//回到起始点
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public void StartMove()
|
||||
{
|
||||
|
||||
|
||||
// 提取路径中的所有点的位置
|
||||
|
||||
for (int i = 0; i < pathPoints.Length; i++)
|
||||
{
|
||||
if (objectToMove.GetComponent<PlayerMovePos>().StartPos == pathPoints[i])
|
||||
{
|
||||
startIndex = i;
|
||||
//Debug.Log("Startindex"+i);
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (EndPos == pathPoints[i])
|
||||
{
|
||||
endIndex = i;
|
||||
//Debug.Log("Endindex" + i);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (endIndex > startIndex)
|
||||
{
|
||||
if (IsBoos)
|
||||
{
|
||||
duration = 2f;
|
||||
}
|
||||
else
|
||||
{
|
||||
duration = (endIndex - startIndex) / Speed;
|
||||
}
|
||||
|
||||
Vector3[] waypoints = new Vector3[endIndex - startIndex + 1];
|
||||
for (int i = startIndex, j = 0; j < pathPoints.Length && i <= endIndex; i++, j++)
|
||||
{
|
||||
|
||||
waypoints[j] = pathPoints[i].position;
|
||||
|
||||
}
|
||||
OnMove(waypoints);
|
||||
}
|
||||
else if (endIndex < startIndex)
|
||||
{
|
||||
if (IsBoos)
|
||||
{
|
||||
duration = 3f;
|
||||
}
|
||||
else
|
||||
{
|
||||
duration = (startIndex - endIndex) / Speed;
|
||||
}
|
||||
//duration = (startIndex-endIndex) / Speed;
|
||||
Vector3[] waypoints = new Vector3[startIndex - endIndex + 1];
|
||||
for (int i = startIndex, j = 0; j < pathPoints.Length && i >= endIndex; i--, j++)
|
||||
{
|
||||
|
||||
|
||||
waypoints[j] = pathPoints[i].position;
|
||||
|
||||
}
|
||||
OnMove(waypoints);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void AfterMove()
|
||||
{
|
||||
|
||||
RectTransform rectTransform = objectToMove.GetComponent<RectTransform>();
|
||||
|
||||
|
||||
//objectToMove.DOMoveY(objectToMove.position.y + 100, 0.5f).OnComplete(() => {
|
||||
rectTransform.DOAnchorPosY(rectTransform.anchoredPosition.y + 80f, 0.5f)
|
||||
.OnComplete(() => {
|
||||
|
||||
|
||||
|
||||
SetParentToHouse();
|
||||
|
||||
|
||||
objectToMove.GetComponent<PlayerMovePos>().StartPos = EndPos;
|
||||
|
||||
|
||||
objectToMove.GetComponent<PlayerMovePos>().PlayAni.SetInteger("State", 0);
|
||||
if (!IsOtherWoniu)
|
||||
{
|
||||
MaskContro.instance.SetMask(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
rectTransform.anchoredPosition = new Vector2(rectTransform.anchoredPosition.x + Random.Range(-50, 50), rectTransform.anchoredPosition.y);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
//});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public void Rotate()
|
||||
{
|
||||
|
||||
Vector3 currentRotation = objectToMove.localEulerAngles;
|
||||
currentRotation.y += 180f;
|
||||
objectToMove.localEulerAngles = currentRotation;
|
||||
|
||||
}
|
||||
|
||||
public void OnMove(Vector3[] waypoints)
|
||||
{
|
||||
|
||||
objectToMove.GetComponent<PlayerMovePos>().PlayAni.SetInteger("State", 1);
|
||||
|
||||
|
||||
|
||||
|
||||
MoveOutParent();
|
||||
Tween pathTween = objectToMove.DOPath(waypoints, duration, PathType.Linear)
|
||||
.SetEase(Ease.Linear) // 设置线性过渡效果
|
||||
.SetLoops(isLooping ? -1 : 0)
|
||||
.OnWaypointChange((index) =>
|
||||
{
|
||||
// 当物体到达某个路径点时回调
|
||||
if (index < waypoints.Length - 1)
|
||||
{
|
||||
Vector3 currentWaypoint = waypoints[index];
|
||||
Vector3 nextWaypoint = waypoints[index + 1];
|
||||
if (IsBoos)
|
||||
{
|
||||
if (nextWaypoint.x < currentWaypoint.x && !GetComponent<BossContro>().IsLeft)
|
||||
{
|
||||
GetComponent<BossContro>().IsLeft = true;
|
||||
// 旋转物体使其面向左侧(绕Y轴旋转180度)
|
||||
Rotate();
|
||||
}
|
||||
else if (nextWaypoint.x > currentWaypoint.x && GetComponent<BossContro>().IsLeft)
|
||||
{
|
||||
GetComponent<BossContro>().IsLeft = false;
|
||||
Rotate();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// 判断物体是否需要旋转
|
||||
if (nextWaypoint.x < currentWaypoint.x && !objectToMove.GetComponent<PlayerMovePos>().IsLeft)
|
||||
{
|
||||
objectToMove.GetComponent<PlayerMovePos>().IsLeft = true;
|
||||
// 旋转物体使其面向左侧(绕Y轴旋转180度)
|
||||
Rotate();
|
||||
}
|
||||
else if (nextWaypoint.x > currentWaypoint.x && objectToMove.GetComponent<PlayerMovePos>().IsLeft)
|
||||
{
|
||||
objectToMove.GetComponent<PlayerMovePos>().IsLeft = false;
|
||||
Rotate();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
.OnComplete(AfterMove);
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a0e93af545a029e44bc39dff4b909107
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -292,16 +292,20 @@ public class PlayerMove : MonoBehaviour
|
||||
public void AfterMove()
|
||||
{
|
||||
|
||||
|
||||
RectTransform rectTransform = objectToMove.GetComponent<RectTransform>();
|
||||
if (IsBoos||!objectToMove.GetComponent<PlayerMovePos>().IsReturn)
|
||||
{
|
||||
if (!IsBoos)
|
||||
{
|
||||
objectToMove.DOMoveY(objectToMove.position.y + 100, 0.5f).OnComplete(() => {
|
||||
//objectToMove.DOMoveY(objectToMove.position.y + 100, 0.5f).OnComplete(() => {
|
||||
rectTransform.DOAnchorPosY(rectTransform.anchoredPosition.y + 80f, 0.5f)
|
||||
.OnComplete(() => {
|
||||
|
||||
|
||||
JudgeEnd();
|
||||
SetParentToHouse();
|
||||
|
||||
|
||||
|
||||
objectToMove.GetComponent<PlayerMovePos>().StartPos = EndPos;
|
||||
|
||||
|
||||
@ -312,11 +316,13 @@ public class PlayerMove : MonoBehaviour
|
||||
}
|
||||
else
|
||||
{
|
||||
objectToMove.transform.position = new Vector2(transform.position.x + Random.Range(-50, 50), transform.position.y + Random.Range(-20, 0));
|
||||
rectTransform.anchoredPosition = new Vector2(rectTransform.anchoredPosition.x + Random.Range(-50, 50), rectTransform.anchoredPosition.y);
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
//});
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -327,7 +333,7 @@ public class PlayerMove : MonoBehaviour
|
||||
allHouseContro.ControOneDoorOpen(GetComponent<BossContro>().HouseId,() => {//¿ªÃÅ
|
||||
|
||||
GetComponent<BossContro>().BossAni.SetInteger("State", 1);
|
||||
objectToMove.DOMoveY(objectToMove.position.y + 100, 0.5f).OnComplete(() => {//½ø·¿¼ä
|
||||
rectTransform.DOAnchorPosY(rectTransform.anchoredPosition.y + 80f, 0.5f).OnComplete(() => {//½ø·¿¼ä
|
||||
|
||||
|
||||
|
||||
|
105
TheStrongestSnail/Assets/Scripts/Battle_Royale/Promptmgr.cs
Normal file
105
TheStrongestSnail/Assets/Scripts/Battle_Royale/Promptmgr.cs
Normal file
@ -0,0 +1,105 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
public class Promptmgr : MonoBehaviour
|
||||
{
|
||||
public static Promptmgr Instance;
|
||||
public GameObject PromptPrefab;
|
||||
private GameObject PromptWhiltePrefab;
|
||||
private float movedistance = 400f;//移动的距离
|
||||
private float moveDuration = 1f;//移动所需的时间
|
||||
public GameObject canvs;
|
||||
public Text protext;
|
||||
|
||||
private float timer;
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
|
||||
Instance = this;
|
||||
DontDestroyOnLoad(this);
|
||||
PromptPrefab = (GameObject)Resources.Load("Popups");
|
||||
protext=PromptPrefab.transform.Find("Text").GetComponent<Text>();
|
||||
//PromptWhiltePrefab = (GameObject)Resources.Load("Prefabs/PromptWhite");
|
||||
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
//timer += Time.deltaTime;
|
||||
//if (timer>3f)
|
||||
//{
|
||||
// Destroy(this.transform.gameObject);
|
||||
//}
|
||||
}
|
||||
|
||||
public void PromptBubble(string message)
|
||||
{
|
||||
PromptBubble(message, Color.black, Color.white);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 显示弹窗
|
||||
/// </summary>
|
||||
/// <param name="message">显示的内容</param>
|
||||
/// <param name="textColor">文字颜色,默认白色</param>
|
||||
/// <param name="backgroundColor">背景颜色,默认黑色</param>
|
||||
public void PromptBubble(string message, Color textColor, Color backgroundColor)
|
||||
{
|
||||
GameObject proobj = Instantiate(PromptPrefab);
|
||||
proobj.transform.SetParent(canvs.transform);
|
||||
proobj.transform.position = new Vector3(Screen.width / 2, Screen.height / 2 + 33, 0);
|
||||
StartCoroutine(MoveUpandDestory(proobj));
|
||||
|
||||
//Text protext = proobj.transform.Find("Prompttext").GetComponent<Text>();
|
||||
protext.text = message;
|
||||
protext.color = textColor; // 设置文本颜色
|
||||
|
||||
// 设置背景颜色
|
||||
Image backgroundImage = proobj.GetComponent<Image>();
|
||||
if (backgroundImage != null)
|
||||
{
|
||||
backgroundImage.color = backgroundColor; // 设置背景颜色
|
||||
}
|
||||
}
|
||||
public void PromptWhilteBubble(string message)
|
||||
{
|
||||
GameObject proobj = Instantiate(PromptWhiltePrefab);
|
||||
proobj.transform.SetParent(canvs.transform);
|
||||
proobj.transform.position = new Vector3(Screen.width / 2, Screen.height / 2 + 33, 0);
|
||||
StartCoroutine(MoveUpandDestory(proobj));
|
||||
//Text protext = proobj.transform.Find("Prompttext").GetComponent<Text>(); ;
|
||||
protext.text = message;
|
||||
}
|
||||
|
||||
IEnumerator MoveUpandDestory(GameObject obj)
|
||||
{
|
||||
RectTransform uielement = obj.GetComponent<RectTransform>();
|
||||
Vector3 startPosition = uielement.anchoredPosition;
|
||||
Vector3 endPosition = startPosition + new Vector3(0, movedistance, 0);
|
||||
|
||||
float elapsedTime = 0f;
|
||||
|
||||
|
||||
|
||||
while (elapsedTime < moveDuration)
|
||||
{
|
||||
uielement.anchoredPosition = Vector3.Lerp(startPosition, endPosition, (elapsedTime / moveDuration));
|
||||
elapsedTime += Time.deltaTime;
|
||||
yield return null; // 等待下一帧
|
||||
}
|
||||
|
||||
uielement.anchoredPosition = endPosition; // 确保最终位置准确
|
||||
|
||||
|
||||
if (uielement != null && uielement.gameObject != null)
|
||||
{
|
||||
Destroy(uielement.gameObject); // 销毁UI元素
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 57e5147ed4aa884499713edeaa5cb4c7
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -40,6 +40,7 @@ public class GameEscapeRoomResponseVo
|
||||
public int escapeId; // 游戏的ID
|
||||
public int roomNo; // 房间编号
|
||||
public float roomBeansCoin; // 房间下注欢乐豆
|
||||
public int roomUserNo;
|
||||
}
|
||||
[Serializable]
|
||||
public class userIDgameId
|
||||
@ -137,6 +138,16 @@ public class GameEscapeModel
|
||||
public float beansCoinDivide; // 分成豆币
|
||||
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class ServerResponse513 : Response
|
||||
{
|
||||
public int code; // 数据对象
|
||||
public string mesage;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//玩家信息
|
||||
[Serializable]
|
||||
public class UserInfomation14: Response
|
||||
|
@ -9,17 +9,26 @@ public class otherWoniu : MonoBehaviour
|
||||
public List<BossContro> bossContros;
|
||||
public Transform OrPosTrams;//出发点
|
||||
public Transform Panrent;//父亲节点
|
||||
public AllHouseContro allHouseContros;
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
//OtherWoniuMove();
|
||||
}
|
||||
|
||||
public void OtherWoniuMove()
|
||||
public void OtherWoniuMove(int roomNo)
|
||||
{
|
||||
int Index = Random.Range(0, EndPosList.Count);
|
||||
transform.GetComponent<PlayerMove>().EndPos = EndPosList[Index].transform;
|
||||
transform.GetComponent<PlayerMove>().StartMove();
|
||||
foreach (HouseBtn house in allHouseContros.HouseBtnList)
|
||||
{
|
||||
if (house.roomNo==roomNo)
|
||||
{
|
||||
transform.GetComponent<PlayerMove>().EndPos=house.post.transform;
|
||||
transform.GetComponent<PlayerMove>().StartMove();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void BackWait()
|
||||
|
@ -8,7 +8,7 @@ Material:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: ScrollShader
|
||||
m_Shader: {fileID: 4800000, guid: 0524dc31955a45d40bbe4c2d348490a4, type: 3}
|
||||
m_Shader: {fileID: 4800000, guid: b908e50deff2bc9428cf43e58c588b2c, type: 3}
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
|
@ -6,7 +6,7 @@ TextureImporter:
|
||||
serializedVersion: 12
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
@ -36,13 +36,13 @@ TextureImporter:
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 0
|
||||
wrapV: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 0
|
||||
nPOTScale: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
@ -51,9 +51,9 @@ TextureImporter:
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 0
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 0
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
@ -119,7 +119,7 @@ TextureImporter:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
|
Loading…
Reference in New Issue
Block a user