diff --git a/TheStrongestSnail/Assets/Scripts/Conversion/DonatePanelItem.cs b/TheStrongestSnail/Assets/Scripts/Conversion/DonatePanelItem.cs index d608e52..4d790ec 100644 --- a/TheStrongestSnail/Assets/Scripts/Conversion/DonatePanelItem.cs +++ b/TheStrongestSnail/Assets/Scripts/Conversion/DonatePanelItem.cs @@ -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(response); + if (serverResponse.code != 200) + { + addEventPopUp(serverResponse.message); + } + + Destroy(gameObject); } async void GiftQuantityData(string userInput) { diff --git a/TheStrongestSnail/Assets/common/base/EventPopUp.cs b/TheStrongestSnail/Assets/common/base/EventPopUp.cs index 973638e..85c34f9 100644 --- a/TheStrongestSnail/Assets/common/base/EventPopUp.cs +++ b/TheStrongestSnail/Assets/common/base/EventPopUp.cs @@ -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); } diff --git a/TheStrongestSnail/Assets/common/base/base.cs b/TheStrongestSnail/Assets/common/base/base.cs index 4d0a80e..c539582 100644 --- a/TheStrongestSnail/Assets/common/base/base.cs +++ b/TheStrongestSnail/Assets/common/base/base.cs @@ -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 tcs = new TaskCompletionSource(); 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); }); // 第二个动画 diff --git a/TheStrongestSnail/Assets/prefabs/Convert2Panel.prefab b/TheStrongestSnail/Assets/prefabs/Convert2Panel.prefab index 160ad7d..15370fd 100644 --- a/TheStrongestSnail/Assets/prefabs/Convert2Panel.prefab +++ b/TheStrongestSnail/Assets/prefabs/Convert2Panel.prefab @@ -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 diff --git a/TheStrongestSnail/Assets/prefabs/Donate2Panel.prefab b/TheStrongestSnail/Assets/prefabs/Donate2Panel.prefab index a4efa44..38d7177 100644 --- a/TheStrongestSnail/Assets/prefabs/Donate2Panel.prefab +++ b/TheStrongestSnail/Assets/prefabs/Donate2Panel.prefab @@ -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