25 lines
779 B
C#
25 lines
779 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class DonatePanel : BaseUIPanel
|
|
{
|
|
public Button Button1;
|
|
public Button Button2;
|
|
public GameObject game;
|
|
void Start()
|
|
{
|
|
Button1.onClick.AddListener(() => ButtononClick(DonatePanelItem.mode.voluteCoin, Button1));
|
|
Button2.onClick.AddListener(() => ButtononClick(DonatePanelItem.mode.slot, Button2));
|
|
}
|
|
|
|
void ButtononClick(DonatePanelItem.mode mymode, Button button)
|
|
{
|
|
ButtonClickAnimationAsync(button.gameObject);
|
|
Canvas canvas = GetComponentInParent<Canvas>();
|
|
GameObject conver = Instantiate(game, canvas.transform);
|
|
conver.GetComponentInChildren<DonatePanelItem>().mymode = mymode;
|
|
}
|
|
}
|