public XiLianData InitXiLianData(Def.AttrId id, int num) { if (id == Def.AttrId.None) { return(null); //XiLianData d = new XiLianData(); //d.id = 0; //d.min = 0; //d.max = 0; //d.name = "None"; //d.num = 0; //return d; } else { XiLianData d = new XiLianData(); XiLianMaxData max = GameShared.Instance.GetXiLianByType(id); d.id = id; d.min = max.min; d.max = max.max; d.name = Comm.GetAttrStr(id); d.num = (int)num; Debug.Log("id" + id + "num" + num); return(d); } }
public XiLianData InitXiLianData(Def.AttrId id, int num) { XiLianData d = new XiLianData(); d.id = id; XiLianMaxData max = GameShared.Instance.GetXiLianByType(id); d.min = max.min; d.max = max.max; d.name = Comm.GetAttrStr(id); d.num = (int)num; Debug.Log("id" + id + "num" + num); return(d); }
public string GetAttrStr(Def.AttrId type) { string str = ""; switch (type) { case Def.AttrId.FightPower: str = "战力"; break; case Def.AttrId.Defense: str = "防御"; break; case Def.AttrId.Pray: str = "王者"; break; case Def.AttrId.Crit: str = "暴击"; break; } return(str); }
public float GetUserAttrByType(Def.AttrId id) { return(userAttr.attrArr[(int)id]); }
public XiLianMaxData GetXiLianByType(Def.AttrId id) { return(xilianMaxTable[id]); }