Compare commits
2 Commits
694e658cf2
...
cef08d3c9a
Author | SHA1 | Date | |
---|---|---|---|
cef08d3c9a | |||
5219ae6d5c |
2022
TheStrongestSnail/Assets/Resources/LLPrefabs/Donate3Panel.prefab
Normal file
2022
TheStrongestSnail/Assets/Resources/LLPrefabs/Donate3Panel.prefab
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 05a39ff91f9f6e540a25c456675c0f5f
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -237,7 +237,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1446808872202028735, guid: ac8d6e0263df8e7479c3b9e87ae8d394, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 0
|
||||
value: 86
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2608027775408396139, guid: ac8d6e0263df8e7479c3b9e87ae8d394, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
@ -271,6 +271,14 @@ PrefabInstance:
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2608027776460094656, guid: ac8d6e0263df8e7479c3b9e87ae8d394, type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2608027776460094656, guid: ac8d6e0263df8e7479c3b9e87ae8d394, type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2608027777032625079, guid: ac8d6e0263df8e7479c3b9e87ae8d394, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 1
|
||||
@ -711,7 +719,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4509579862271681876, guid: 54a9ec38d2fa7ad4aba7938e3016e96c, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: -1893
|
||||
value: -1796
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4509579862271681876, guid: 54a9ec38d2fa7ad4aba7938e3016e96c, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
@ -1341,6 +1349,7 @@ RectTransform:
|
||||
- {fileID: 634825388}
|
||||
- {fileID: 1994134238}
|
||||
- {fileID: 451518060}
|
||||
- {fileID: 1551424551223686286}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
@ -2455,11 +2464,269 @@ RectTransform:
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!1001 &25113033110532038
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 887987927}
|
||||
m_Modifications:
|
||||
- target: {fileID: 25113032895961188, guid: 05a39ff91f9f6e540a25c456675c0f5f, type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 763
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 25113032895961188, guid: 05a39ff91f9f6e540a25c456675c0f5f, type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: 178
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 25113033217063996, guid: 05a39ff91f9f6e540a25c456675c0f5f, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 25113033217063996, guid: 05a39ff91f9f6e540a25c456675c0f5f, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 25113033217063996, guid: 05a39ff91f9f6e540a25c456675c0f5f, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 25113033217063996, guid: 05a39ff91f9f6e540a25c456675c0f5f, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 25113033349338467, guid: 05a39ff91f9f6e540a25c456675c0f5f, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 25113033349338467, guid: 05a39ff91f9f6e540a25c456675c0f5f, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 25113033349338467, guid: 05a39ff91f9f6e540a25c456675c0f5f, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 25113033349338467, guid: 05a39ff91f9f6e540a25c456675c0f5f, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1575974285488541783, guid: 05a39ff91f9f6e540a25c456675c0f5f, type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1575974285488541783, guid: 05a39ff91f9f6e540a25c456675c0f5f, type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: 574
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 0}
|
||||
propertyPath: Button1
|
||||
value:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 0}
|
||||
propertyPath: Button2
|
||||
value:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1575974285488541783, guid: 05a39ff91f9f6e540a25c456675c0f5f, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1575974285488541783, guid: 05a39ff91f9f6e540a25c456675c0f5f, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1575974285488541783, guid: 05a39ff91f9f6e540a25c456675c0f5f, type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1575974285488541783, guid: 05a39ff91f9f6e540a25c456675c0f5f, type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1575974285488541783, guid: 05a39ff91f9f6e540a25c456675c0f5f, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 569
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1575974285488541783, guid: 05a39ff91f9f6e540a25c456675c0f5f, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: -574
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1575974286187993605, guid: 05a39ff91f9f6e540a25c456675c0f5f, type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 1268
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1575974286187993605, guid: 05a39ff91f9f6e540a25c456675c0f5f, type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: 1011
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1575974286418504480, guid: 05a39ff91f9f6e540a25c456675c0f5f, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1575974286418504480, guid: 05a39ff91f9f6e540a25c456675c0f5f, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1575974286418504480, guid: 05a39ff91f9f6e540a25c456675c0f5f, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 488
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1575974286418504480, guid: 05a39ff91f9f6e540a25c456675c0f5f, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: -287
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1575974286437964616, guid: 05a39ff91f9f6e540a25c456675c0f5f, type: 3}
|
||||
propertyPath: m_Pivot.x
|
||||
value: 0.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1575974286437964616, guid: 05a39ff91f9f6e540a25c456675c0f5f, type: 3}
|
||||
propertyPath: m_Pivot.y
|
||||
value: 0.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1575974286437964616, guid: 05a39ff91f9f6e540a25c456675c0f5f, type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 4
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1575974286437964616, guid: 05a39ff91f9f6e540a25c456675c0f5f, type: 3}
|
||||
propertyPath: m_AnchorMax.x
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1575974286437964616, guid: 05a39ff91f9f6e540a25c456675c0f5f, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1575974286437964616, guid: 05a39ff91f9f6e540a25c456675c0f5f, type: 3}
|
||||
propertyPath: m_AnchorMin.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1575974286437964616, guid: 05a39ff91f9f6e540a25c456675c0f5f, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1575974286437964616, guid: 05a39ff91f9f6e540a25c456675c0f5f, type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1575974286437964616, guid: 05a39ff91f9f6e540a25c456675c0f5f, type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1575974286437964616, guid: 05a39ff91f9f6e540a25c456675c0f5f, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1575974286437964616, guid: 05a39ff91f9f6e540a25c456675c0f5f, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1575974286437964616, guid: 05a39ff91f9f6e540a25c456675c0f5f, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1575974286437964616, guid: 05a39ff91f9f6e540a25c456675c0f5f, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1575974286437964616, guid: 05a39ff91f9f6e540a25c456675c0f5f, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1575974286437964616, guid: 05a39ff91f9f6e540a25c456675c0f5f, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1575974286437964616, guid: 05a39ff91f9f6e540a25c456675c0f5f, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1575974286437964616, guid: 05a39ff91f9f6e540a25c456675c0f5f, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 6
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1575974286437964616, guid: 05a39ff91f9f6e540a25c456675c0f5f, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1575974286437964616, guid: 05a39ff91f9f6e540a25c456675c0f5f, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1575974286437964616, guid: 05a39ff91f9f6e540a25c456675c0f5f, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1575974286437964616, guid: 05a39ff91f9f6e540a25c456675c0f5f, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1575974286437964617, guid: 05a39ff91f9f6e540a25c456675c0f5f, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: Donate3Panel
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1575974286437964617, guid: 05a39ff91f9f6e540a25c456675c0f5f, type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4558195883795728987, guid: 05a39ff91f9f6e540a25c456675c0f5f, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4558195883795728987, guid: 05a39ff91f9f6e540a25c456675c0f5f, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4558195883795728987, guid: 05a39ff91f9f6e540a25c456675c0f5f, type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4558195883795728987, guid: 05a39ff91f9f6e540a25c456675c0f5f, type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: 178
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4558195883795728987, guid: 05a39ff91f9f6e540a25c456675c0f5f, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 569
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4558195883795728987, guid: 05a39ff91f9f6e540a25c456675c0f5f, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: -160
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4558195885396887175, guid: 05a39ff91f9f6e540a25c456675c0f5f, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4558195885396887175, guid: 05a39ff91f9f6e540a25c456675c0f5f, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4558195885396887175, guid: 05a39ff91f9f6e540a25c456675c0f5f, type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4558195885396887175, guid: 05a39ff91f9f6e540a25c456675c0f5f, type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: 899
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4558195885396887175, guid: 05a39ff91f9f6e540a25c456675c0f5f, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 628.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4558195885396887175, guid: 05a39ff91f9f6e540a25c456675c0f5f, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: -497.5
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 05a39ff91f9f6e540a25c456675c0f5f, type: 3}
|
||||
--- !u!224 &471259897268817232 stripped
|
||||
RectTransform:
|
||||
m_CorrespondingSourceObject: {fileID: 1551424549758334541, guid: 0818e16ae17cf3f4b959a0a1c9bf5e0b, type: 3}
|
||||
m_PrefabInstance: {fileID: 5588270725520666551}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!224 &1551424551223686286 stripped
|
||||
RectTransform:
|
||||
m_CorrespondingSourceObject: {fileID: 1575974286437964616, guid: 05a39ff91f9f6e540a25c456675c0f5f, type: 3}
|
||||
m_PrefabInstance: {fileID: 25113033110532038}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1001 &5588270725520666551
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -2537,7 +2804,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1551424549758334541, guid: 0818e16ae17cf3f4b959a0a1c9bf5e0b, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: -3635
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1551424549758334541, guid: 0818e16ae17cf3f4b959a0a1c9bf5e0b, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
|
@ -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)
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
55
TheStrongestSnail/Assets/Scripts/lianghaoLL/DonateTc.cs
Normal file
55
TheStrongestSnail/Assets/Scripts/lianghaoLL/DonateTc.cs
Normal 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()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
11
TheStrongestSnail/Assets/Scripts/lianghaoLL/DonateTc.cs.meta
Normal file
11
TheStrongestSnail/Assets/Scripts/lianghaoLL/DonateTc.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 871a2436f2fcbc8428ff0c89f6f64cad
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Loading…
Reference in New Issue
Block a user