Compare commits
3 Commits
382c51f242
...
cdaadb8126
Author | SHA1 | Date | |
---|---|---|---|
cdaadb8126 | |||
a3e611368f | |||
7bc0efc8ee |
@ -260,6 +260,7 @@ GameObject:
|
|||||||
- component: {fileID: 7733483716990088035}
|
- component: {fileID: 7733483716990088035}
|
||||||
- component: {fileID: 3335798973629821471}
|
- component: {fileID: 3335798973629821471}
|
||||||
- component: {fileID: 6642128994121697517}
|
- component: {fileID: 6642128994121697517}
|
||||||
|
- component: {fileID: 3076726767603001194}
|
||||||
m_Layer: 5
|
m_Layer: 5
|
||||||
m_Name: sxcarditem
|
m_Name: sxcarditem
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
@ -328,6 +329,18 @@ MonoBehaviour:
|
|||||||
m_FillOrigin: 0
|
m_FillOrigin: 0
|
||||||
m_UseSpriteMesh: 0
|
m_UseSpriteMesh: 0
|
||||||
m_PixelsPerUnitMultiplier: 1
|
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
|
--- !u!1 &6456615796520121862
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -55,7 +55,7 @@ public class Scene_main_jiekou :MonoBehaviour
|
|||||||
Auctioncertificate auctioncertificate=new Auctioncertificate();
|
Auctioncertificate auctioncertificate=new Auctioncertificate();
|
||||||
Islandownerbidding islandownerbidding=new Islandownerbidding();
|
Islandownerbidding islandownerbidding=new Islandownerbidding();
|
||||||
petdraw petdraw = new petdraw();
|
petdraw petdraw = new petdraw();
|
||||||
|
treeachievement treeachievement = new treeachievement();
|
||||||
public static Scene_main_jiekou instance;
|
public static Scene_main_jiekou instance;
|
||||||
|
|
||||||
//public PlayerInfoData infoData;
|
//public PlayerInfoData infoData;
|
||||||
@ -392,4 +392,10 @@ public class Scene_main_jiekou :MonoBehaviour
|
|||||||
body.trade_password = tradepassword;
|
body.trade_password = tradepassword;
|
||||||
return await petdraw.PetdrawInfosInfo(body);
|
return await petdraw.PetdrawInfosInfo(body);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async Task<treeachievementResponse> Treeachievements()
|
||||||
|
{
|
||||||
|
return await treeachievement.Treeachievement();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
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.paths = path;
|
||||||
this.pathsNeedTimer = pathsNeedTimer+Random.Range(0,10);
|
this.pathsNeedTimer = pathsNeedTimer+Random.Range(0,10);
|
||||||
@ -69,17 +69,20 @@ public class minerControl : MonoBehaviour
|
|||||||
this.endPos = endPos;
|
this.endPos = endPos;
|
||||||
|
|
||||||
|
|
||||||
|
// 等待移动完成
|
||||||
|
await MoveToEndPositionAsync(endPos.position);
|
||||||
|
|
||||||
if (Vector3.Distance(this.transform.position, startPos.position) <= 0.01f)
|
// 挖矿操作
|
||||||
{
|
|
||||||
//Debug.LogWarning("11111111111111");
|
|
||||||
MoveToFishingPos();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// Debug.LogWarning("22222222222222222");
|
|
||||||
dig();
|
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)
|
public void SetState(minerState newState)
|
||||||
|
Loading…
Reference in New Issue
Block a user