This commit is contained in:
杨号敬 2025-01-06 18:00:05 +08:00
commit 7f29518205
7 changed files with 277 additions and 219 deletions

View File

@ -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

File diff suppressed because it is too large Load Diff

View File

@ -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();
}
}

View 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()
{
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: d11d008e8fe37cb45a056fc92114465f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -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)
@ -123,7 +126,7 @@ public class minerControl : MonoBehaviour
}
//¸Ä±ä³¯Ïò
ChangeShipLook(pathPoints[0], pathPoints[path.Count - 1]);
ChangeShipLook(this.transform.position, pathPoints[path.Count - 1]);

View File

@ -133,6 +133,8 @@ public class roomcontroller : MonoBehaviour
Vector3 pos = new Vector3(Random.Range((endPos.position.x-startPos.position.x)/2, endPos.position.x), endPos.position.y, endPos.position.z);
fishMan.transform.position = pos;
//fishMan.transform.position = endPos.position;
fishManShipContorl = fishMan.GetComponent<minerControl>();
fishManShipContorl.init(this.paths, this.pathsNeedTimer, this.fishingNeedTimer, this.restTimer, this.startPos, this.endPos);