36 lines
838 B
C#
36 lines
838 B
C#
|
using System.Collections;
|
|||
|
using System.Collections.Generic;
|
|||
|
using UnityEngine;
|
|||
|
using UnityEngine.UI;
|
|||
|
|
|||
|
public class WateringBtn : MonoBehaviour
|
|||
|
{
|
|||
|
public Button wateringBtn;
|
|||
|
void Start()
|
|||
|
{
|
|||
|
wateringBtn = GetComponent<Button>();
|
|||
|
wateringBtn.onClick.AddListener(WateringClick);
|
|||
|
}
|
|||
|
|
|||
|
async void WateringClick()
|
|||
|
{
|
|||
|
WateringTreeResponse response = await Scene_main_jiekou.instance.WateringTrees();
|
|||
|
if (response.code == 200)
|
|||
|
{
|
|||
|
Debug.Log("<22><>ˮ<EFBFBD>ɹ<EFBFBD>");
|
|||
|
TreeInfo info = await Scene_main_jiekou.instance.TreeInfoS();
|
|||
|
WaterPanel.instance. Updated_interface(info);
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
Promptmgr.Instance.PromptBubble(response.message);
|
|||
|
}
|
|||
|
|
|||
|
}
|
|||
|
// Update is called once per frame
|
|||
|
void Update()
|
|||
|
{
|
|||
|
|
|||
|
}
|
|||
|
}
|