This commit is contained in:
舒荣森 2024-11-26 18:14:09 +08:00
parent 2791991b56
commit 0a90f577ae
5 changed files with 18 additions and 8 deletions

View File

@ -1,3 +1,4 @@
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using TMPro;
@ -31,7 +32,13 @@ public class DonatePanelItem : BaseUIPanel
body.toCuteNo = Recipient.text;
body.voluteCoin = int.Parse(GiftQuantity.text);
string response = await web.SendRequest(web.URL + "/snail/transfer/voluteCoin", "POST", JsonUtility.ToJson(body), testhead);//²âÊÔ
Debug.Log(response);
ServerResponse18 serverResponse = JsonConvert.DeserializeObject<ServerResponse18>(response);
if (serverResponse.code != 200)
{
addEventPopUp(serverResponse.message);
}
Destroy(gameObject);
}
async void GiftQuantityData(string userInput)
{

View File

@ -17,6 +17,7 @@ public class EventPopUp : MonoBehaviour
transform.DOMoveY(canvasHeight - (canvasHeight*0.3f), 1.5f);
await Task.Delay(500);
Image.DOColor(new Color(1f, 1f, 1f, 0f), 5f);
textobg.DOColor(new Color(1f, 1f, 1f, 0f), 5f);
await Task.Delay(5100);
Destroy(gameObject);
}

View File

@ -19,12 +19,12 @@ public class Base : MonoBehaviour
}
}
public async Task ButtonClickAnimationAsync(GameObject button,float max=1.25f)//按钮动画
public async Task ButtonClickAnimationAsync(GameObject button,float max=1.25f,float timemultiple = 1)//按钮动画
{
TaskCompletionSource<bool> tcs = new TaskCompletionSource<bool>();
Sequence mySequence = DOTween.Sequence();
mySequence.Append(button.transform.DOScale(max, 0.1f)) // 第一个动画
.Append(button.transform.DOScale(1f, 0.2f)).OnComplete(() => {
mySequence.Append(button.transform.DOScale(max, 0.1f* timemultiple)) // 第一个动画
.Append(button.transform.DOScale(1f, 0.2f* timemultiple)).OnComplete(() => {
// 动画播放完成后执行的代码
tcs.SetResult(true);
}); // 第二个动画

View File

@ -167,6 +167,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
retbutton: {fileID: 0}
ClosureObj: {fileID: 0}
Panel: {fileID: 158567709692854181}
CloseBTN: {fileID: 0}
inputField: {fileID: 6168167768698745100}
@ -533,14 +534,14 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0, g: 0, b: 0, a: 1}
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: d0f93cc6dcb63dc469d4c00af1ee40f1, type: 3}
m_Sprite: {fileID: 21300000, guid: 4b8d122b9c4b31e4dad67a608e400dc8, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1

View File

@ -1316,6 +1316,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
retbutton: {fileID: 3568963963287766741}
ClosureObj: {fileID: 0}
Panel: {fileID: 4509579862240682304}
CloseBTN: {fileID: 0}
Recipient: {fileID: 5167839042553029366}
@ -3581,14 +3582,14 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0, g: 0, b: 0, a: 1}
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: d0f93cc6dcb63dc469d4c00af1ee40f1, type: 3}
m_Sprite: {fileID: 21300000, guid: 4b8d122b9c4b31e4dad67a608e400dc8, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1