Merge branch 'main' of http://shu.sheziwanglo.cn:3000/shurongsen/Cute_demon_attacks
This commit is contained in:
commit
425673347c
@ -260,6 +260,7 @@ GameObject:
|
||||
- component: {fileID: 7733483716990088035}
|
||||
- component: {fileID: 3335798973629821471}
|
||||
- component: {fileID: 6642128994121697517}
|
||||
- component: {fileID: 3076726767603001194}
|
||||
m_Layer: 5
|
||||
m_Name: sxcarditem
|
||||
m_TagString: Untagged
|
||||
@ -328,6 +329,18 @@ MonoBehaviour:
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!114 &3076726767603001194
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3842424130508822905}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d11d008e8fe37cb45a056fc92114465f, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &6456615796520121862
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -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
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -55,7 +55,7 @@ public class Scene_main_jiekou :MonoBehaviour
|
||||
Auctioncertificate auctioncertificate=new Auctioncertificate();
|
||||
Islandownerbidding islandownerbidding=new Islandownerbidding();
|
||||
petdraw petdraw = new petdraw();
|
||||
|
||||
treeachievement treeachievement = new treeachievement();
|
||||
public static Scene_main_jiekou instance;
|
||||
|
||||
//public PlayerInfoData infoData;
|
||||
@ -392,4 +392,10 @@ public class Scene_main_jiekou :MonoBehaviour
|
||||
body.trade_password = tradepassword;
|
||||
return await petdraw.PetdrawInfosInfo(body);
|
||||
}
|
||||
|
||||
public async Task<treeachievementResponse> Treeachievements()
|
||||
{
|
||||
return await treeachievement.Treeachievement();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -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}");
|
||||
}
|
||||
}
|
||||
|
23
meng_yao/Assets/script/scene_Main/ui/sxcarditem.cs
Normal file
23
meng_yao/Assets/script/scene_Main/ui/sxcarditem.cs
Normal file
@ -0,0 +1,23 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class sxcarditem : MonoBehaviour
|
||||
{
|
||||
public Image sxcarbg;
|
||||
public Image CardSprite;
|
||||
public Image sxcardupblue;
|
||||
public Text name;
|
||||
|
||||
void Start()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
11
meng_yao/Assets/script/scene_Main/ui/sxcarditem.cs.meta
Normal file
11
meng_yao/Assets/script/scene_Main/ui/sxcarditem.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d11d008e8fe37cb45a056fc92114465f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -59,7 +59,7 @@ public class minerControl : MonoBehaviour
|
||||
}
|
||||
|
||||
|
||||
public void init(List<Path> path,float pathsNeedTimer,float fishingNeedTimer,float restTimer,Transform startPos,Transform endPos)
|
||||
public async void init(List<Path> path,float pathsNeedTimer,float fishingNeedTimer,float restTimer,Transform startPos,Transform endPos)
|
||||
{
|
||||
this.paths = path;
|
||||
this.pathsNeedTimer = pathsNeedTimer+Random.Range(0,10);
|
||||
@ -68,18 +68,21 @@ public class minerControl : MonoBehaviour
|
||||
this.startPos = startPos;
|
||||
this.endPos = endPos;
|
||||
|
||||
|
||||
|
||||
if (Vector3.Distance(this.transform.position, startPos.position) <= 0.01f)
|
||||
{
|
||||
//Debug.LogWarning("11111111111111");
|
||||
MoveToFishingPos();
|
||||
}
|
||||
else
|
||||
{
|
||||
// Debug.LogWarning("22222222222222222");
|
||||
dig();
|
||||
}
|
||||
// 等待移动完成
|
||||
await MoveToEndPositionAsync(endPos.position);
|
||||
|
||||
// 挖矿操作
|
||||
dig();
|
||||
}
|
||||
|
||||
private async System.Threading.Tasks.Task MoveToEndPositionAsync(Vector3 targetPosition)
|
||||
{
|
||||
// 使用 DOTween 进行移动,并等待动画完成
|
||||
Tweener tweener = transform.DOMove(targetPosition, 3f);
|
||||
|
||||
// 等待动画完成
|
||||
await tweener.AsyncWaitForCompletion();
|
||||
}
|
||||
|
||||
public void SetState(minerState newState)
|
||||
|
Loading…
Reference in New Issue
Block a user