WIP: boutons sorts

This commit is contained in:
Crom (Thibaut CHARLES) 2015-03-05 17:33:17 +01:00
parent d562db1cc3
commit d753d87fbc
3 changed files with 43 additions and 5 deletions

View File

@ -1,5 +1,5 @@
id _name name_strref description script
0 "veille nocturne" 1 "se rend invincible pendant un tour" _
1 "coup de crépière" 2 "inflige 25 pv de dégats à un personnage" _
2 "goulée de cidre" 3 "soigne un personnage de 50 PV" _
3 "omelette aux champignons" 4 "rend un personnage malade pendant un tour, ne peux ni parler, ni rien faire pendant un tour" _
id _name name_strref icon _description script
0 "veille nocturne" 1 "veillee.png" "se rend invincible pendant un tour" _
1 "coup de crépière" 2 "crepiere.png" "inflige 25 pv de dégats à un personnage" _
2 "goulée de cidre" 3 "cidre.png" "soigne un personnage de 50 PV" _
3 "omelette aux champignons" 4 "omelette.png" "rend un personnage malade pendant un tour, ne peux ni parler, ni rien faire pendant un tour" _

View File

@ -0,0 +1,26 @@
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");
}
}
}

View File

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 76b745b171184de4b9790ed6c5871a98
timeCreated: 1425572098
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: