using UnityEngine; using System.Collections; public class Player { public Player(int _charID, int _roleID){ charID = _charID; roleID = _roleID; var ct = Rdb.GetTable("characters"); charname = ct.GetValue(charID, "name"); spellID = ct.GetValue(charID, "spell"); hp = ct.GetValue(charID, "hp"); var rt = Rdb.GetTable("roles"); rolename = rt.GetValue(roleID, "name"); ultiID = rt.GetValue(roleID, "ulti"); align = rt.GetValue(roleID, "alignment"); } public void DebugInfo() { Debug.Log(charname+" is a "+rolename+" with "+hp.ToString()+" hit points"); } public int charID; public int roleID; public string charname; public int spellID; public int hp; public string rolename; public int ultiID; public string align; }