akadoc/Assets/scripts/Gui.AbilityButton.cs

27 lines
429 B
C#
Raw Normal View History

2015-03-05 16:33:17 +00:00
using UnityEngine;
using System.Collections;
namespace Gui{
public class AbilityButton : UnityEngine.UI.Button, MonoBehaviour, Databind.Slave {
public int spellID;
void Start(){
onClick.AddListener(()=>{
Debug.Log("Clicked");
});
SetSpellID(spellID);
}
void SetSpellID(int _spellID){
//Set image, callback
string sIcon = Rdb.GetTable("spells").GetValue<string>(_spellID, "icon");
}
}
}