This commit is contained in:
wulongxiao 2024-11-27 01:48:59 +08:00
commit cac8fb3968
12 changed files with 4530 additions and 378 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 05a39ff91f9f6e540a25c456675c0f5f
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@ -10,8 +10,8 @@ public class DonatePanel : BaseUIPanel
public GameObject game;
void Start()
{
Button1.onClick.AddListener(() => ButtononClick(DonatePanelItem.mode.voluteCoin, Button1));
Button2.onClick.AddListener(() => ButtononClick(DonatePanelItem.mode.slot, Button2));
Button1.onClick.AddListener(() => ButtononClick(DonatePanelItem.mode.slot, Button1));
Button2.onClick.AddListener(() => ButtononClick(DonatePanelItem.mode.voluteCoin, Button2));
}
void ButtononClick(DonatePanelItem.mode mymode, Button button)

View File

@ -44,24 +44,17 @@ public class DonatePanelItem : BaseUIPanel
}
async void buttonOnClick()
{
string response = "";//²âÊÔ
Canvas canvas = GetComponentInParent<Canvas>();
GameObject donateTc = (GameObject)Instantiate(Resources.Load("LLPrefabs/Donate3Panel"),canvas.transform);
donateTc.GetComponent<DonateTc>().donatePanelItem = this;
if (mymode == mode.voluteCoin)
{
string body = "{\"toCuteNo\":" + (int.Parse(Recipient.text)).ToString() + ",\"voluteCoin\":" + GiftQuantity.text + "}";
response = await web.SendRequest(web.URL + "/snail/transfer/voluteCoin", "POST", body, Global.global.CreateHeaders());
donateTc.GetComponent<DonateTc>().ConfirmText.text = "材料【蜗壳】数量【" + GiftQuantity.text + "】至ID【" + Recipient.text + "】";
}
else
{
string body = "{\"toCuteNo\":" + (int.Parse(Recipient.text)).ToString() + ",\"slotId\":" + GiftQuantity.text + "}";
response = await web.SendRequest(web.URL + "/snail/transfer/slot", "POST", body, Global.global.CreateHeaders());
donateTc.GetComponent<DonateTc>().ConfirmText.text = "材料【卡槽】数量【" + GiftQuantity.text + "】至ID【" + Recipient.text + "】";
}
ServerResponse18 serverResponse = JsonConvert.DeserializeObject<ServerResponse18>(response);
if (serverResponse.code != 200)
{
addEventPopUp(serverResponse.message);
}
Destroy(gameObject);
}
async void GiftQuantityData(string userInput)
{
@ -78,7 +71,8 @@ public class DonatePanelItem : BaseUIPanel
Total.text = (int.Parse(userInput) + (int.Parse(userInput) * 0.08)).ToString();
await ButtonClickAnimationAsync(Total.gameObject, 1.05f);
}
}
}
}

View File

@ -0,0 +1,55 @@
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class DonateTc : BaseUIPanel
{
public Text ConfirmText;
public Button ConfirmBtn;
public Button CancelBtn;
public DonatePanelItem donatePanelItem;
// Start is called before the first frame update
void Start()
{
ConfirmBtn.onClick.AddListener(ConfrimPanel);
CancelBtn.onClick.AddListener(CancelPanel);
}
void CancelPanel()
{
Destroy(this.gameObject);
}
async void ConfrimPanel()
{
string response = "";//²âÊÔ
if (donatePanelItem.mymode == DonatePanelItem.mode.voluteCoin)
{
string body = "{\"toCuteNo\":\"" + (int.Parse(donatePanelItem.Recipient.text)).ToString() + "\",\"voluteCoin\":" + int.Parse(donatePanelItem.GiftQuantity.text) + "}";
Debug.Log(body);
response = await web.SendRequest(web.URL + "/snail/transfer/voluteCoin", "POST", body, Global.global.CreateHeaders());
}
else
{
string body = "{\"toCuteNo\":\"" + (int.Parse(donatePanelItem.Recipient.text)).ToString() + "\",\"slotId\":" + int.Parse(donatePanelItem.GiftQuantity.text) + "}";
Debug.Log(body);
response = await web.SendRequest(web.URL + "/snail/transfer/slot", "POST", body, Global.global.CreateHeaders());
}
ServerResponse18 serverResponse = JsonConvert.DeserializeObject<ServerResponse18>(response);
if (serverResponse.code != 200)
{
addEventPopUp(serverResponse.message);
}
// Destroy(gameObject);
}
// Update is called once per frame
void Update()
{
}
}

View File

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

View File

@ -0,0 +1,36 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using TMPro;
using UnityEngine.UI;
public class ExchangePanel : MonoBehaviour
{
public TMP_InputField exchangeInput;
public Button CancelBtn;
public Button ConfirmBtn;
// Start is called before the first frame update
void Start()
{
ConfirmBtn.onClick.AddListener(ConfrimPanel);
CancelBtn.onClick.AddListener(CancelPanel);
}
void CancelPanel()
{
Destroy(this.gameObject);
}
async void ConfrimPanel()
{
}
// Update is called once per frame
void Update()
{
}
}

View File

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

View File

@ -1319,6 +1319,7 @@ RectTransform:
- {fileID: 9180338298600716149}
- {fileID: 9180338300042457440}
- {fileID: 9180338299797677304}
- {fileID: 3806672049044183909}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -1866,3 +1867,144 @@ MonoBehaviour:
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1001 &8590880877876473192
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 9180338299762767603}
m_Modifications:
- target: {fileID: 4894555910357792268, guid: dac544bca4358514d949413f04b4421c, type: 3}
propertyPath: m_Name
value: retrun_BTN
objectReference: {fileID: 0}
- target: {fileID: 4894555910357792269, guid: dac544bca4358514d949413f04b4421c, type: 3}
propertyPath: m_Pivot.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 4894555910357792269, guid: dac544bca4358514d949413f04b4421c, type: 3}
propertyPath: m_Pivot.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 4894555910357792269, guid: dac544bca4358514d949413f04b4421c, type: 3}
propertyPath: m_RootOrder
value: 3
objectReference: {fileID: 0}
- target: {fileID: 4894555910357792269, guid: dac544bca4358514d949413f04b4421c, type: 3}
propertyPath: m_AnchorMax.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 4894555910357792269, guid: dac544bca4358514d949413f04b4421c, type: 3}
propertyPath: m_AnchorMax.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 4894555910357792269, guid: dac544bca4358514d949413f04b4421c, type: 3}
propertyPath: m_AnchorMin.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 4894555910357792269, guid: dac544bca4358514d949413f04b4421c, type: 3}
propertyPath: m_AnchorMin.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 4894555910357792269, guid: dac544bca4358514d949413f04b4421c, type: 3}
propertyPath: m_SizeDelta.x
value: 175
objectReference: {fileID: 0}
- target: {fileID: 4894555910357792269, guid: dac544bca4358514d949413f04b4421c, type: 3}
propertyPath: m_SizeDelta.y
value: 155
objectReference: {fileID: 0}
- target: {fileID: 4894555910357792269, guid: dac544bca4358514d949413f04b4421c, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4894555910357792269, guid: dac544bca4358514d949413f04b4421c, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4894555910357792269, guid: dac544bca4358514d949413f04b4421c, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4894555910357792269, guid: dac544bca4358514d949413f04b4421c, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4894555910357792269, guid: dac544bca4358514d949413f04b4421c, type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 4894555910357792269, guid: dac544bca4358514d949413f04b4421c, type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 4894555910357792269, guid: dac544bca4358514d949413f04b4421c, type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 4894555910357792269, guid: dac544bca4358514d949413f04b4421c, type: 3}
propertyPath: m_AnchoredPosition.x
value: 472
objectReference: {fileID: 0}
- target: {fileID: 4894555910357792269, guid: dac544bca4358514d949413f04b4421c, type: 3}
propertyPath: m_AnchoredPosition.y
value: -1059
objectReference: {fileID: 0}
- target: {fileID: 4894555910357792269, guid: dac544bca4358514d949413f04b4421c, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4894555910357792269, guid: dac544bca4358514d949413f04b4421c, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4894555910357792269, guid: dac544bca4358514d949413f04b4421c, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4894555910357792270, guid: dac544bca4358514d949413f04b4421c, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Mode
value: 6
objectReference: {fileID: 0}
- target: {fileID: 4894555910357792270, guid: dac544bca4358514d949413f04b4421c, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target
value:
objectReference: {fileID: 9180338299762767612}
- target: {fileID: 4894555910357792270, guid: dac544bca4358514d949413f04b4421c, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName
value: SetActive
objectReference: {fileID: 0}
- target: {fileID: 4894555910357792270, guid: dac544bca4358514d949413f04b4421c, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_TargetAssemblyTypeName
value: UnityEngine.GameObject, UnityEngine
objectReference: {fileID: 0}
- target: {fileID: 4894555910357792270, guid: dac544bca4358514d949413f04b4421c, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName
value: UnityEngine.Object, UnityEngine
objectReference: {fileID: 0}
- target: {fileID: 5044707777241721125, guid: dac544bca4358514d949413f04b4421c, type: 3}
propertyPath: retbutton
value:
objectReference: {fileID: 3806672049044183910}
- target: {fileID: 5044707777241721125, guid: dac544bca4358514d949413f04b4421c, type: 3}
propertyPath: ClosureObj
value:
objectReference: {fileID: 9180338299762767612}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: dac544bca4358514d949413f04b4421c, type: 3}
--- !u!224 &3806672049044183909 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 4894555910357792269, guid: dac544bca4358514d949413f04b4421c, type: 3}
m_PrefabInstance: {fileID: 8590880877876473192}
m_PrefabAsset: {fileID: 0}
--- !u!114 &3806672049044183910 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 4894555910357792270, guid: dac544bca4358514d949413f04b4421c, type: 3}
m_PrefabInstance: {fileID: 8590880877876473192}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:

View File

@ -3850,6 +3850,7 @@ RectTransform:
- {fileID: 3485144750598401731}
- {fileID: 3485144751281113911}
- {fileID: 3485144751565381415}
- {fileID: 7763160578183012954}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -3896,3 +3897,144 @@ MonoBehaviour:
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1001 &2905030397198865495
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 3485144752579768852}
m_Modifications:
- target: {fileID: 4894555910357792268, guid: dac544bca4358514d949413f04b4421c, type: 3}
propertyPath: m_Name
value: retrun_BTN
objectReference: {fileID: 0}
- target: {fileID: 4894555910357792269, guid: dac544bca4358514d949413f04b4421c, type: 3}
propertyPath: m_Pivot.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 4894555910357792269, guid: dac544bca4358514d949413f04b4421c, type: 3}
propertyPath: m_Pivot.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 4894555910357792269, guid: dac544bca4358514d949413f04b4421c, type: 3}
propertyPath: m_RootOrder
value: 5
objectReference: {fileID: 0}
- target: {fileID: 4894555910357792269, guid: dac544bca4358514d949413f04b4421c, type: 3}
propertyPath: m_AnchorMax.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 4894555910357792269, guid: dac544bca4358514d949413f04b4421c, type: 3}
propertyPath: m_AnchorMax.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 4894555910357792269, guid: dac544bca4358514d949413f04b4421c, type: 3}
propertyPath: m_AnchorMin.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 4894555910357792269, guid: dac544bca4358514d949413f04b4421c, type: 3}
propertyPath: m_AnchorMin.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 4894555910357792269, guid: dac544bca4358514d949413f04b4421c, type: 3}
propertyPath: m_SizeDelta.x
value: 175
objectReference: {fileID: 0}
- target: {fileID: 4894555910357792269, guid: dac544bca4358514d949413f04b4421c, type: 3}
propertyPath: m_SizeDelta.y
value: 155
objectReference: {fileID: 0}
- target: {fileID: 4894555910357792269, guid: dac544bca4358514d949413f04b4421c, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4894555910357792269, guid: dac544bca4358514d949413f04b4421c, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4894555910357792269, guid: dac544bca4358514d949413f04b4421c, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4894555910357792269, guid: dac544bca4358514d949413f04b4421c, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4894555910357792269, guid: dac544bca4358514d949413f04b4421c, type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 4894555910357792269, guid: dac544bca4358514d949413f04b4421c, type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 4894555910357792269, guid: dac544bca4358514d949413f04b4421c, type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 4894555910357792269, guid: dac544bca4358514d949413f04b4421c, type: 3}
propertyPath: m_AnchoredPosition.x
value: 472
objectReference: {fileID: 0}
- target: {fileID: 4894555910357792269, guid: dac544bca4358514d949413f04b4421c, type: 3}
propertyPath: m_AnchoredPosition.y
value: -1059
objectReference: {fileID: 0}
- target: {fileID: 4894555910357792269, guid: dac544bca4358514d949413f04b4421c, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4894555910357792269, guid: dac544bca4358514d949413f04b4421c, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4894555910357792269, guid: dac544bca4358514d949413f04b4421c, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4894555910357792270, guid: dac544bca4358514d949413f04b4421c, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Mode
value: 6
objectReference: {fileID: 0}
- target: {fileID: 4894555910357792270, guid: dac544bca4358514d949413f04b4421c, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target
value:
objectReference: {fileID: 3485144752579768855}
- target: {fileID: 4894555910357792270, guid: dac544bca4358514d949413f04b4421c, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName
value: SetActive
objectReference: {fileID: 0}
- target: {fileID: 4894555910357792270, guid: dac544bca4358514d949413f04b4421c, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_TargetAssemblyTypeName
value: UnityEngine.GameObject, UnityEngine
objectReference: {fileID: 0}
- target: {fileID: 4894555910357792270, guid: dac544bca4358514d949413f04b4421c, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName
value: UnityEngine.Object, UnityEngine
objectReference: {fileID: 0}
- target: {fileID: 5044707777241721125, guid: dac544bca4358514d949413f04b4421c, type: 3}
propertyPath: retbutton
value:
objectReference: {fileID: 7763160578183012953}
- target: {fileID: 5044707777241721125, guid: dac544bca4358514d949413f04b4421c, type: 3}
propertyPath: ClosureObj
value:
objectReference: {fileID: 3485144752579768855}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: dac544bca4358514d949413f04b4421c, type: 3}
--- !u!114 &7763160578183012953 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 4894555910357792270, guid: dac544bca4358514d949413f04b4421c, type: 3}
m_PrefabInstance: {fileID: 2905030397198865495}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!224 &7763160578183012954 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 4894555910357792269, guid: dac544bca4358514d949413f04b4421c, type: 3}
m_PrefabInstance: {fileID: 2905030397198865495}
m_PrefabAsset: {fileID: 0}

View File

@ -1655,8 +1655,8 @@ MonoBehaviour:
m_Calls: []
m_text: "\u65B0\u589E\u5730\u5740"
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: ce6703600b5ae7446aa7b2e450658b26, type: 2}
m_sharedMaterial: {fileID: -4172574303371915638, guid: ce6703600b5ae7446aa7b2e450658b26, type: 2}
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
@ -1790,8 +1790,8 @@ MonoBehaviour:
m_Calls: []
m_text: "\u6536\u8D27\u5730\u5740"
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: ce6703600b5ae7446aa7b2e450658b26, type: 2}
m_sharedMaterial: {fileID: -4172574303371915638, guid: ce6703600b5ae7446aa7b2e450658b26, type: 2}
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []