24 lines
541 B
C#
24 lines
541 B
C#
|
using System;
|
|||
|
using UnityEngine;
|
|||
|
using UnityEngine.UI;
|
|||
|
|
|||
|
namespace Runtime.UI.Other
|
|||
|
{
|
|||
|
public class ButtonCarryData : MonoBehaviour
|
|||
|
{
|
|||
|
public string stringData;
|
|||
|
public int intData;
|
|||
|
public float floatData;
|
|||
|
public Action<string, int, float> OnClickTheme;
|
|||
|
|
|||
|
private void Awake()
|
|||
|
{
|
|||
|
GetComponent<Button>().onClick.AddListener(ClickButton);
|
|||
|
}
|
|||
|
|
|||
|
private void ClickButton()
|
|||
|
{
|
|||
|
OnClickTheme?.Invoke(stringData, intData, floatData);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|