本文整理汇总了C#中Exp.getKuniLv方法的典型用法代码示例。如果您正苦于以下问题:C# Exp.getKuniLv方法的具体用法?C# Exp.getKuniLv怎么用?C# Exp.getKuniLv使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Exp
的用法示例。
在下文中一共展示了Exp.getKuniLv方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Update
//.........这里部分代码省略.........
addKahou (activeItemType, activeItemId);
}
//Qty
string itemQtyPath = "Prefabs/PostKassen/itemQty";
GameObject itemQtyObj = Instantiate (Resources.Load (itemQtyPath)) as GameObject;
itemQtyObj.transform.SetParent (itemListObj.transform);
itemQtyObj.transform.localScale = new Vector2 (0.09f, 0.09f);
itemQtyObj.transform.localPosition = new Vector2 (290, 35);
itemQtyObj.GetComponent<Text> ().text = "x " + activeItemQty.ToString ();
PlayerPrefs.Flush ();
}
} else {
itemListObj.transform.FindChild ("stageName").transform.FindChild("stageNameValue").GetComponent<Text> ().text = stageName + "成功";
}
//Money
int activeStageMoney = PlayerPrefs.GetInt("activeStageMoney",0);
GameObject.Find ("moneyAmt").GetComponent<Text>().text = activeStageMoney.ToString();
int currentMoney = PlayerPrefs.GetInt("money");
currentMoney = currentMoney + activeStageMoney;
PlayerPrefs.SetInt("money",currentMoney);
//kuniExp
int activeStageExp = PlayerPrefs.GetInt("activeStageExp",0);
GameObject.Find ("expAmt").GetComponent<Text>().text = activeStageExp.ToString();
int currentKuniExp = PlayerPrefs.GetInt ("kuniExp");
currentKuniExp = currentKuniExp + activeStageExp;
int kuniLv = PlayerPrefs.GetInt ("kuniLv");
Exp kuniExp = new Exp();
int newKuniLv = kuniExp.getKuniLv(kuniLv,currentKuniExp);
if(newKuniLv>kuniLv){
//lv up
int jinkeiLimit = kuniExp.getJinkeiLimit(newKuniLv);
int stockLimit = kuniExp.getStockLimit(newKuniLv);
PlayerPrefs.SetInt("jinkeiLimit",jinkeiLimit);
PlayerPrefs.SetInt("stockLimit",stockLimit);
}else{
Debug.Log ("No level up");
}
/*Cleared Flag*/
if(!isAttackedFlg){
int activeKuniId = PlayerPrefs.GetInt("activeKuniId");
int activeStageId = PlayerPrefs.GetInt("activeStageId");
string temp = "kuni" + activeKuniId.ToString();
List<string> clearedStageList = new List<string>();
string clearedStageString = PlayerPrefs.GetString(temp);
if(clearedStageString !=null && clearedStageString !=""){
//after 1st time
char[] delimiterChars = {','};
clearedStageList = new List<string>(clearedStageString.Split (delimiterChars));
if(clearedStageList.Contains(activeStageId.ToString()) == false){
clearedStageString = clearedStageString + "," + activeStageId.ToString();
//1st Kuni Clear Check
string[] commaCounter = clearedStageString.Split(delimiterChars);
int counter = commaCounter.Length;
示例2: Update
//.........这里部分代码省略.........
//Modfication Size & Location
GameObject item = GameObject.Find ("itemIcon");
item.transform.localScale = new Vector2 (0.4f, 0.42f);
item.transform.localPosition = new Vector2(80,-105);
item.GetComponent<Button>().enabled = false;
//Qty
string itemQtyPath = "Prefabs/PostKassen/itemQty";
GameObject itemQtyObj = Instantiate(Resources.Load (itemQtyPath)) as GameObject;
itemQtyObj.transform.SetParent(itemListObj.transform);
itemQtyObj.transform.localScale = new Vector2(0.09f,0.09f);
itemQtyObj.transform.localPosition = new Vector2(130,-105);
itemQtyObj.GetComponent<Text>().text = "x " + activeItemQty.ToString();
//
PlayerPrefs.Flush();
}
//Money
int activeStageMoney = PlayerPrefs.GetInt("activeStageMoney",0);
GameObject.Find ("moneyAmt").GetComponent<TextMesh>().text = activeStageMoney.ToString();
int currentMoney = PlayerPrefs.GetInt("money");
currentMoney = currentMoney + activeStageMoney;
PlayerPrefs.SetInt("money",currentMoney);
//kuniExp
int activeStageExp = PlayerPrefs.GetInt("activeStageExp",0);
GameObject.Find ("expAmt").GetComponent<TextMesh>().text = activeStageExp.ToString();
int currentKuniExp = PlayerPrefs.GetInt ("kuniExp");
currentKuniExp = currentKuniExp + activeStageExp;
int kuniLv = PlayerPrefs.GetInt ("kuniLv");
Exp kuniExp = new Exp();
int newKuniLv = kuniExp.getKuniLv(kuniLv,currentKuniExp);
if(newKuniLv>kuniLv){
//lv up
int jinkeiLimit = kuniExp.getJinkeiLimit(newKuniLv);
int stockLimit = kuniExp.getStockLimit(newKuniLv);
PlayerPrefs.SetInt("jinkeiLimit",jinkeiLimit);
PlayerPrefs.SetInt("stockLimit",stockLimit);
}else{
Debug.Log ("No level up");
}
/*Cleared Flag*/
int activeKuniId = PlayerPrefs.GetInt("activeKuniId");
int activeStageId = PlayerPrefs.GetInt("activeStageId");
string temp = "kuni" + activeKuniId.ToString();
List<string> clearedStageList = new List<string>();
string clearedStageString = PlayerPrefs.GetString(temp);
if(clearedStageString !=null && clearedStageString !=""){
//after 1st time
char[] delimiterChars = {','};
clearedStageList = new List<string>(clearedStageString.Split (delimiterChars));
if(clearedStageList.Contains(activeStageId.ToString()) == false){
clearedStageString = clearedStageString + "," + activeStageId.ToString();
//1st Kuni Clear Check
string[] commaCounter = clearedStageString.Split(delimiterChars);
int counter = commaCounter.Length;
if(counter == 10){