最强钓手鱼动画
This commit is contained in:
parent
ef5d5a75ea
commit
46c8eb2ac3
@ -12,6 +12,7 @@ GameObject:
|
||||
- component: {fileID: 7179720788267147198}
|
||||
- component: {fileID: 7179720788267147199}
|
||||
- component: {fileID: 7179720788267146305}
|
||||
- component: {fileID: 1323658210407296953}
|
||||
m_Layer: 5
|
||||
m_Name: yu_1
|
||||
m_TagString: Untagged
|
||||
@ -138,3 +139,18 @@ MonoBehaviour:
|
||||
- {fileID: 21300000, guid: a420ed476dcf8874ebb3375151756ec4, type: 3}
|
||||
image: {fileID: 7179720788267147199}
|
||||
Aintime: 100
|
||||
--- !u!114 &1323658210407296953
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7179720788267147197}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fddbdc5c74eeb4b46b4c821499b90a1b, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
moveDirection: 1
|
||||
minX: -10
|
||||
maxX: 10
|
||||
|
@ -12,6 +12,7 @@ GameObject:
|
||||
- component: {fileID: 8324679930610600351}
|
||||
- component: {fileID: 8324679930610600350}
|
||||
- component: {fileID: 8324679930610600349}
|
||||
- component: {fileID: 6317456324827660837}
|
||||
m_Layer: 5
|
||||
m_Name: yu_2
|
||||
m_TagString: Untagged
|
||||
@ -146,3 +147,18 @@ MonoBehaviour:
|
||||
- {fileID: 21300000, guid: ba04355d1eb177044b702a916e94d438, type: 3}
|
||||
image: {fileID: 8324679930610600350}
|
||||
Aintime: 100
|
||||
--- !u!114 &6317456324827660837
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8324679930610600339}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fddbdc5c74eeb4b46b4c821499b90a1b, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
moveDirection: 1
|
||||
minX: -10
|
||||
maxX: 10
|
||||
|
@ -12,6 +12,7 @@ GameObject:
|
||||
- component: {fileID: 8327991688875048608}
|
||||
- component: {fileID: 8327991688875048609}
|
||||
- component: {fileID: 8327991688875048610}
|
||||
- component: {fileID: -6877920821272356357}
|
||||
m_Layer: 5
|
||||
m_Name: yu_3
|
||||
m_TagString: Untagged
|
||||
@ -139,3 +140,18 @@ MonoBehaviour:
|
||||
- {fileID: 21300000, guid: 94824feb5d3c28d458962ebc813bc0b9, type: 3}
|
||||
image: {fileID: 8327991688875048609}
|
||||
Aintime: 100
|
||||
--- !u!114 &-6877920821272356357
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8327991688875048604}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fddbdc5c74eeb4b46b4c821499b90a1b, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
moveDirection: 1
|
||||
minX: -10
|
||||
maxX: 10
|
||||
|
@ -12,6 +12,7 @@ GameObject:
|
||||
- component: {fileID: 6887896110515514781}
|
||||
- component: {fileID: 6887896110515514782}
|
||||
- component: {fileID: 6887896110515514783}
|
||||
- component: {fileID: 7293057087621258661}
|
||||
m_Layer: 5
|
||||
m_Name: yu_4
|
||||
m_TagString: Untagged
|
||||
@ -139,3 +140,18 @@ MonoBehaviour:
|
||||
- {fileID: 21300000, guid: bbe33713255e84e4d815a76d1a4904b8, type: 3}
|
||||
image: {fileID: 6887896110515514782}
|
||||
Aintime: 100
|
||||
--- !u!114 &7293057087621258661
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6887896110515514769}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fddbdc5c74eeb4b46b4c821499b90a1b, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
moveDirection: 1
|
||||
minX: -10
|
||||
maxX: 10
|
||||
|
@ -12,6 +12,7 @@ GameObject:
|
||||
- component: {fileID: 6078443173104442901}
|
||||
- component: {fileID: 6078443173104442900}
|
||||
- component: {fileID: 6078443173104442899}
|
||||
- component: {fileID: -5744433287826975578}
|
||||
m_Layer: 5
|
||||
m_Name: yu_5
|
||||
m_TagString: Untagged
|
||||
@ -139,3 +140,18 @@ MonoBehaviour:
|
||||
- {fileID: 21300000, guid: c2f7daa6c8e846d4e9ebf94d41bd13de, type: 3}
|
||||
image: {fileID: 6078443173104442900}
|
||||
Aintime: 100
|
||||
--- !u!114 &-5744433287826975578
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6078443173104442897}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fddbdc5c74eeb4b46b4c821499b90a1b, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
moveDirection: 1
|
||||
minX: -10
|
||||
maxX: 10
|
||||
|
@ -12,6 +12,7 @@ GameObject:
|
||||
- component: {fileID: 8063980341957640642}
|
||||
- component: {fileID: 8063980341957640643}
|
||||
- component: {fileID: 8063980341957640644}
|
||||
- component: {fileID: 5564382702866818782}
|
||||
m_Layer: 5
|
||||
m_Name: yu_6
|
||||
m_TagString: Untagged
|
||||
@ -132,3 +133,18 @@ MonoBehaviour:
|
||||
- {fileID: 21300000, guid: 00878fe4eecf21942a9ad3ad6086e3de, type: 3}
|
||||
image: {fileID: 8063980341957640643}
|
||||
Aintime: 100
|
||||
--- !u!114 &5564382702866818782
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8063980341957640646}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fddbdc5c74eeb4b46b4c821499b90a1b, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
moveDirection: 1
|
||||
minX: -10
|
||||
maxX: 10
|
||||
|
@ -40430,6 +40430,10 @@ PrefabInstance:
|
||||
propertyPath: m_Name
|
||||
value: yu_6
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8063980341957640646, guid: c446c1690e0c42344b3ee6f7cae47912, type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: c446c1690e0c42344b3ee6f7cae47912, type: 3}
|
||||
--- !u!224 &426265566 stripped
|
||||
@ -40437,6 +40441,26 @@ RectTransform:
|
||||
m_CorrespondingSourceObject: {fileID: 8063980341957640645, guid: c446c1690e0c42344b3ee6f7cae47912, type: 3}
|
||||
m_PrefabInstance: {fileID: 426265565}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1 &426265567 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: 8063980341957640646, guid: c446c1690e0c42344b3ee6f7cae47912, type: 3}
|
||||
m_PrefabInstance: {fileID: 426265565}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!114 &426265568
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 426265567}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fddbdc5c74eeb4b46b4c821499b90a1b, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
moveDirection: 1
|
||||
minX: -10
|
||||
maxX: 10
|
||||
--- !u!1 &427817386
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -93221,7 +93245,7 @@ MonoBehaviour:
|
||||
petLevelshow: {fileID: 7550977465108078569}
|
||||
petExpFill: {fileID: 7550977464679505027}
|
||||
feedBtn: {fileID: 1477323885672320044}
|
||||
LotteryBtn: {fileID: 1113331948}
|
||||
LotteryBtn: {fileID: 0}
|
||||
Pet: {fileID: 7550977465179483479}
|
||||
PlaceOfBirthtext: {fileID: 1477323885143245122}
|
||||
shenxiao:
|
||||
@ -100362,6 +100386,7 @@ MonoBehaviour:
|
||||
- {fileID: 6887896110515514769, guid: ace9193e009411b4f903197028e5cc5d, type: 3}
|
||||
- {fileID: 6078443173104442897, guid: 67e04b1a5e4abd9499ad7887353b3ce7, type: 3}
|
||||
- {fileID: 8063980341957640646, guid: c446c1690e0c42344b3ee6f7cae47912, type: 3}
|
||||
yup: {fileID: 276578989}
|
||||
--- !u!1 &1073869858
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -121139,7 +121164,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7179720788267147196, guid: 2cc877762118cd543853fb28827f280d, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7179720788267147196, guid: 2cc877762118cd543853fb28827f280d, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
@ -121147,7 +121172,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7179720788267147196, guid: 2cc877762118cd543853fb28827f280d, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7179720788267147196, guid: 2cc877762118cd543853fb28827f280d, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
@ -121155,11 +121180,11 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7179720788267147196, guid: 2cc877762118cd543853fb28827f280d, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 227
|
||||
value: 492
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7179720788267147196, guid: 2cc877762118cd543853fb28827f280d, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 35
|
||||
value: 118
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7179720788267147196, guid: 2cc877762118cd543853fb28827f280d, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
@ -121167,7 +121192,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7179720788267147196, guid: 2cc877762118cd543853fb28827f280d, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
value: 180
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7179720788267147196, guid: 2cc877762118cd543853fb28827f280d, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
@ -121177,6 +121202,10 @@ PrefabInstance:
|
||||
propertyPath: m_Name
|
||||
value: yu_1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7179720788267147197, guid: 2cc877762118cd543853fb28827f280d, type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 2cc877762118cd543853fb28827f280d, type: 3}
|
||||
--- !u!224 &1296128571 stripped
|
||||
@ -121184,6 +121213,26 @@ RectTransform:
|
||||
m_CorrespondingSourceObject: {fileID: 7179720788267147196, guid: 2cc877762118cd543853fb28827f280d, type: 3}
|
||||
m_PrefabInstance: {fileID: 1296128570}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1 &1296128572 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: 7179720788267147197, guid: 2cc877762118cd543853fb28827f280d, type: 3}
|
||||
m_PrefabInstance: {fileID: 1296128570}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!114 &1296128573
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1296128572}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fddbdc5c74eeb4b46b4c821499b90a1b, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
moveDirection: 1
|
||||
minX: -10
|
||||
maxX: 10
|
||||
--- !u!1 &1296679621
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -159653,6 +159702,10 @@ PrefabInstance:
|
||||
propertyPath: m_Name
|
||||
value: yu_2
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8324679930610600339, guid: 3f9336f4f5a1b6045b5aeaa705560923, type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8324679930610600348, guid: 3f9336f4f5a1b6045b5aeaa705560923, type: 3}
|
||||
propertyPath: m_Pivot.x
|
||||
value: 0.5
|
||||
@ -159744,6 +159797,26 @@ RectTransform:
|
||||
m_CorrespondingSourceObject: {fileID: 8324679930610600348, guid: 3f9336f4f5a1b6045b5aeaa705560923, type: 3}
|
||||
m_PrefabInstance: {fileID: 1699813512}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1 &1699813514 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: 8324679930610600339, guid: 3f9336f4f5a1b6045b5aeaa705560923, type: 3}
|
||||
m_PrefabInstance: {fileID: 1699813512}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!114 &1699813515
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1699813514}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fddbdc5c74eeb4b46b4c821499b90a1b, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
moveDirection: 1
|
||||
minX: -10
|
||||
maxX: 10
|
||||
--- !u!1 &1700961442
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -176671,6 +176744,10 @@ PrefabInstance:
|
||||
propertyPath: m_Name
|
||||
value: yu_3 (1)
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8327991688875048604, guid: 3dbff95a51f3ab14397e87122542f5dc, type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8327991688875048611, guid: 3dbff95a51f3ab14397e87122542f5dc, type: 3}
|
||||
propertyPath: m_Pivot.x
|
||||
value: 0.5
|
||||
@ -176762,6 +176839,26 @@ RectTransform:
|
||||
m_CorrespondingSourceObject: {fileID: 8327991688875048611, guid: 3dbff95a51f3ab14397e87122542f5dc, type: 3}
|
||||
m_PrefabInstance: {fileID: 1893834194}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1 &1893834196 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: 8327991688875048604, guid: 3dbff95a51f3ab14397e87122542f5dc, type: 3}
|
||||
m_PrefabInstance: {fileID: 1893834194}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!114 &1893834197
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1893834196}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fddbdc5c74eeb4b46b4c821499b90a1b, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
moveDirection: 1
|
||||
minX: -10
|
||||
maxX: 10
|
||||
--- !u!1 &1893942892
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -200885,6 +200982,10 @@ PrefabInstance:
|
||||
propertyPath: m_Name
|
||||
value: yu_4 (1)
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6887896110515514769, guid: ace9193e009411b4f903197028e5cc5d, type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: ace9193e009411b4f903197028e5cc5d, type: 3}
|
||||
--- !u!224 &2127014108 stripped
|
||||
@ -200892,6 +200993,26 @@ RectTransform:
|
||||
m_CorrespondingSourceObject: {fileID: 6887896110515514768, guid: ace9193e009411b4f903197028e5cc5d, type: 3}
|
||||
m_PrefabInstance: {fileID: 2127014107}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1 &2127014109 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: 6887896110515514769, guid: ace9193e009411b4f903197028e5cc5d, type: 3}
|
||||
m_PrefabInstance: {fileID: 2127014107}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!114 &2127014110
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2127014109}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fddbdc5c74eeb4b46b4c821499b90a1b, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
moveDirection: 1
|
||||
minX: -10
|
||||
maxX: 10
|
||||
--- !u!1 &2127736419 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: 8631885451795898582, guid: 638b7f7423db411419568d073208d929, type: 3}
|
||||
|
@ -0,0 +1,42 @@
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
|
||||
public class FishMovement : MonoBehaviour
|
||||
{
|
||||
float moveSpeed = 20f;
|
||||
public float moveDirection = 1f;
|
||||
public float minX = -10f;
|
||||
public float maxX = 10f;
|
||||
private void Start()
|
||||
{
|
||||
moveDirection = Random.Range(0f, 1f) > 0.5f ? 1f : -1f;
|
||||
|
||||
// 设置初始朝向
|
||||
if (moveDirection > 0)
|
||||
{
|
||||
this.gameObject.transform.eulerAngles = new Vector3(0, 0, 0); // 向右
|
||||
}
|
||||
else
|
||||
{
|
||||
this.gameObject.transform.eulerAngles = new Vector3(0, 180, 0); // 向左
|
||||
}
|
||||
moveDirection = -1f;
|
||||
}
|
||||
private void Update()
|
||||
{
|
||||
// 按设定方向持续移动
|
||||
transform.Translate(Vector3.right * moveDirection * moveSpeed * Time.deltaTime);
|
||||
if(transform.localPosition.x>700)
|
||||
{
|
||||
transform.localPosition = new Vector3(-700, transform.localPosition.y, transform.localPosition.z);
|
||||
}
|
||||
if (transform.localPosition.x < -700)
|
||||
{
|
||||
transform.localPosition = new Vector3(700, transform.localPosition.y, transform.localPosition.z);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fddbdc5c74eeb4b46b4c821499b90a1b
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -27,6 +27,7 @@ public class WebJoinroom : MonoBehaviour
|
||||
public Button Fishing;
|
||||
FishJoinroomData fishJoinroomData;
|
||||
public GameObject[] yu;
|
||||
public GameObject yup;
|
||||
private async void Start()
|
||||
{
|
||||
TimeText.gameObject.transform.parent.gameObject.SetActive(false);
|
||||
@ -118,8 +119,31 @@ public class WebJoinroom : MonoBehaviour
|
||||
Debug.Log($"剩余数量: {fishResponse.data.surplus_count}");
|
||||
intro_text.text = fishResponse.data.intro_text;
|
||||
Debug.Log($"玩法介绍: {fishResponse.data.intro_text}");
|
||||
Vector3 point1 = new Vector3(-500, 0, 150);
|
||||
Vector3 point2 = new Vector3(500, 0, -300);
|
||||
Vector3 point3 = new Vector3(500, 0, 150);
|
||||
Vector3 point4 = new Vector3(-500, 0, -300);
|
||||
|
||||
// 计算矩形区域的最小值和最大值
|
||||
float minX = Mathf.Min(point1.x, point2.x, point3.x, point4.x);
|
||||
float maxX = Mathf.Max(point1.x, point2.x, point3.x, point4.x);
|
||||
|
||||
float minY = Mathf.Min(point1.y, point2.y, point3.y, point4.y);
|
||||
float maxY = Mathf.Max(point1.y, point2.y, point3.y, point4.y);
|
||||
|
||||
float minZ = Mathf.Min(point1.z, point2.z, point3.z, point4.z);
|
||||
float maxZ = Mathf.Max(point1.z, point2.z, point3.z, point4.z);
|
||||
foreach (var item in fishResponse.data.items)
|
||||
{
|
||||
Vector3 spawnPosition = new Vector3(
|
||||
UnityEngine.Random.Range(minX, maxX), // 随机生成 X 轴位置
|
||||
UnityEngine.Random.Range(minY, maxY), // 随机生成 Y 轴位置
|
||||
UnityEngine.Random.Range(minZ, maxZ) // 随机生成 Z 轴位置
|
||||
);
|
||||
|
||||
GameObject ob = Instantiate(yu[item.id]);
|
||||
ob.transform.SetParent(yup.transform);
|
||||
ob.transform.localPosition = spawnPosition;
|
||||
Debug.Log($"物品ID: {item.id}, 物品名称: {item.name}, {item.grade}{item.intro}");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user