49 lines
1.2 KiB
C#
49 lines
1.2 KiB
C#
using System;
|
|
using BrewMonster.Network;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
namespace BrewMonster
|
|
{
|
|
public class RevivePopup : MonoBehaviour
|
|
{
|
|
[SerializeField] private Button velang_btn;
|
|
[SerializeField] private Button dungbua_btn;
|
|
[SerializeField] private Button tiepnhan_btn;
|
|
[SerializeField] private Button kimthannietban_btn;
|
|
|
|
private void Start()
|
|
{
|
|
OnReviveOptionSelected();
|
|
}
|
|
|
|
private void OnReviveOptionSelected()
|
|
{
|
|
velang_btn.onClick.AddListener(ReviveInBase);
|
|
dungbua_btn.onClick.AddListener(ReviveByItem);
|
|
tiepnhan_btn.onClick.AddListener(ReviveByPlayer);
|
|
kimthannietban_btn.onClick.AddListener(ReviveBySpecial);
|
|
}
|
|
|
|
private void ReviveInBase()
|
|
{
|
|
UnityGameSession.c2s_CmdReviveVillage();
|
|
}
|
|
|
|
private void ReviveByItem()
|
|
{
|
|
UnityGameSession.c2s_CmdReviveItem();
|
|
}
|
|
|
|
private void ReviveByPlayer()
|
|
{
|
|
UnityGameSession.RequestReviveByPlayer();
|
|
}
|
|
|
|
private void ReviveBySpecial()
|
|
{
|
|
|
|
}
|
|
}
|
|
}
|