本文整理汇总了C#中Exp.getKuniExpforNextLv方法的典型用法代码示例。如果您正苦于以下问题:C# Exp.getKuniExpforNextLv方法的具体用法?C# Exp.getKuniExpforNextLv怎么用?C# Exp.getKuniExpforNextLv使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Exp
的用法示例。
在下文中一共展示了Exp.getKuniExpforNextLv方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ViewKuniInfo
public void ViewKuniInfo(){
string kuniPath = "Prefabs/Map/KuniInfo";
GameObject kuni = Instantiate (Resources.Load (kuniPath)) as GameObject;
kuni.transform.SetParent(GameObject.Find ("Kakejiku").transform);
kuni.transform.localScale = new Vector2 (1, 1);
kuni.name = "kuniInfo";
//Current Kokuryoku
int kuniExp = PlayerPrefs.GetInt ("kuniExp");
kuni.transform.FindChild ("KuniLvValue").GetComponent<Text> ().text = kuniExp.ToString ();
//Exp for Next Lv
int nowLv = PlayerPrefs.GetInt ("kuniLv");
Exp exp = new Exp ();
int totalExp = exp.getKuniExpforNextLv (nowLv);
int diff = totalExp - kuniExp;
kuni.transform.FindChild ("KuniNextLvValue").GetComponent<Text> ().text = diff.ToString ();
//Now Kuni Qty
string clearedKuni = PlayerPrefs.GetString ("clearedKuni");
if (clearedKuni != null && clearedKuni != "") {
if (clearedKuni.Contains (",")) {
char[] delimiterChars = {','};
string[] clearedKuniList = clearedKuni.Split (delimiterChars);
kuni.transform.FindChild ("ShiroQtyValue").GetComponent<Text> ().text = clearedKuniList.Length.ToString ();
} else {
kuni.transform.FindChild ("ShiroQtyValue").GetComponent<Text> ().text = "1";
}
} else {
kuni.transform.FindChild ("ShiroQtyValue").GetComponent<Text> ().text = "0";
}
//Syutujin Limit
int jinkeiLimit = PlayerPrefs.GetInt ("jinkeiLimit");
kuni.transform.FindChild ("SyutsujinQtyValue").GetComponent<Text> ().text = jinkeiLimit.ToString ();
//Stock Limit
int stockLimit = PlayerPrefs.GetInt ("stockLimit");
int myBusyoQty = PlayerPrefs.GetInt ("myBusyoQty");
string value = myBusyoQty.ToString () + "/" + stockLimit.ToString ();
kuni.transform.FindChild ("TouyouQtyValue").GetComponent<Text> ().text = value;
}