FiE-Game/Assets/Scripts/Fie/UI/FieLobbySelectableUICharacterSelectButton.cs

33 lines
697 B
C#
Raw Normal View History

2018-11-20 20:10:49 +01:00
using UnityEngine;
namespace Fie.UI
{
public class FieLobbySelectableUICharacterSelectButton : MonoBehaviour
{
public delegate void ButtonCallback(FieLobbySelectableUICharacterSelectButton buttonEntity);
[SerializeField]
public FieGameCharacter relatedCharacter;
[SerializeField]
private FieConstValues.FieGameCharacter _gameCharacterType;
[SerializeField]
private Sprite _relatedSprite;
public FieConstValues.FieGameCharacter gameCharacterType => _gameCharacterType;
public Sprite relatedSprite => _relatedSprite;
public event ButtonCallback clickedEvent;
public void Clicked()
{
if (this.clickedEvent != null)
{
this.clickedEvent(this);
}
}
}
}