本文整理汇总了C#中Exp.getExpbyCyadougu方法的典型用法代码示例。如果您正苦于以下问题:C# Exp.getExpbyCyadougu方法的具体用法?C# Exp.getExpbyCyadougu怎么用?C# Exp.getExpbyCyadougu使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Exp
的用法示例。
在下文中一共展示了Exp.getExpbyCyadougu方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Update
//.........这里部分代码省略.........
bool gameClearFlg = true;
for(int i=0; i<seiryokuList.Count; i++){
if(i==0){
newSeiryoku = seiryokuList[i];
}else{
newSeiryoku = newSeiryoku + "," + seiryokuList[i];
}
//game clear check
if(gameClearFlg){
if(seiryokuList[i] != myDaimyo.ToString()){
gameClearFlg = false;
}
}
}
PlayerPrefs.SetBool("gameClearFlg",gameClearFlg);
PlayerPrefs.SetString("seiryoku",newSeiryoku);
//Cyouhou Delete
string cyouhouTmp = "cyouhou" + activeKuniId;
if (PlayerPrefs.HasKey (cyouhouTmp)) {
PlayerPrefs.DeleteKey(cyouhouTmp);
string cyouhou = PlayerPrefs.GetString("cyouhou");
List<string> cyouhouList = new List<string> ();
if (cyouhou != null && cyouhou != "") {
if(cyouhou.Contains(",")){
cyouhouList = new List<string> (cyouhou.Split (delimiterChars));
}else{
cyouhouList.Add(cyouhou);
}
}
cyouhouList.Remove (activeKuniId.ToString());
string newCyouhou = "";
for(int j=0;j<cyouhouList.Count;j++){
if (j == 0) {
newCyouhou = cyouhouList[j];
} else {
newCyouhou = newCyouhou + "," + cyouhouList[j];
}
}
PlayerPrefs.SetString ("cyouhou",newCyouhou);
}
}
}
}else{
//1st time
clearedStageString = activeStageId.ToString();
}
PlayerPrefs.SetString(temp,clearedStageString);
PlayerPrefs.SetInt("kuniLv",newKuniLv);
PlayerPrefs.SetInt("kuniExp",currentKuniExp);
PlayerPrefs.Flush();
}
//Button List
string nextbtnPath = "Prefabs/PostKassen/bttnList";
GameObject bttnListObj = Instantiate(Resources.Load (nextbtnPath)) as GameObject;
bttnListObj.transform.SetParent (canvas.transform);
bttnListObj.transform.localScale = new Vector2(1,1);
bttnListObj.transform.localPosition = new Vector2 (0,0);
//Time Stop
GameObject.Find ("timer").GetComponent<Timer>().enabled = false;
//Get Exp
SenkouButton senkou = new SenkouButton();
List<BusyoSenkou> senkouList = new List<BusyoSenkou>();
senkouList=senkou.getSenkou ();
for(int i=0;i<senkouList.Count;i++){
int busyoId = senkouList[i].id;
int senkouAmt = senkouList[i].senkou;
Exp exp = new Exp();
//Modify by Cyadougu Kahou
senkouAmt = exp.getExpbyCyadougu(busyoId,senkouAmt);
//Busyo Exp
string tempExp = "exp" + busyoId;
int nowExp = PlayerPrefs.GetInt(tempExp);
int newExp = nowExp + senkouAmt;
PlayerPrefs.SetInt(tempExp, newExp);
//Busyo Lv
int nowLv = PlayerPrefs.GetInt(busyoId.ToString());
int newLv = exp.getLvbyTotalExp(nowLv,newExp);
PlayerPrefs.SetInt(busyoId.ToString(), newLv);
PlayerPrefs.Flush();
}
}
}
}
}
示例2: Update
//.........这里部分代码省略.........
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){
//1st time
string clearedKuni = PlayerPrefs.GetString("clearedKuni");
if(clearedKuni !=null && clearedKuni !=""){
clearedKuni = clearedKuni + "," + activeKuniId.ToString();
}else{
clearedKuni = activeKuniId.ToString();
}
PlayerPrefs.SetString("clearedKuni",clearedKuni);
//Give 1st cleared revenue
PlayerPrefs.SetBool("kuniClearedFlg",true);
//Open Kuni
KuniInfo kuni = new KuniInfo();
kuni.registerOpenKuni(activeKuniId);
//Seiryoku Change
string seiryoku = PlayerPrefs.GetString ("seiryoku");
List<string> seiryokuList = new List<string>();
seiryokuList = new List<string> (seiryoku.Split (delimiterChars));
int myDaimyo = PlayerPrefs.GetInt ("myDaimyo");
seiryokuList[activeKuniId-1] = myDaimyo.ToString();
string newSeiryoku = "";
for(int i=0; i<seiryokuList.Count; i++){
if(i==0){
newSeiryoku = seiryokuList[i];
}else{
newSeiryoku = newSeiryoku + "," + seiryokuList[i];
}
}
PlayerPrefs.SetString("seiryoku",newSeiryoku);
}
}
}else{
//1st time
clearedStageString = activeKuniId.ToString();
}
PlayerPrefs.SetString(temp,clearedStageString);
PlayerPrefs.SetInt("kuniLv",newKuniLv);
PlayerPrefs.SetInt("kuniExp",currentKuniExp);
PlayerPrefs.Flush();
//Button List
string nextbtnPath = "Prefabs/PostKassen/bttnList";
GameObject bttnListObj = Instantiate(Resources.Load (nextbtnPath)) as GameObject;
bttnListObj.transform.parent = GameObject.Find ("Canvas").transform;
bttnListObj.transform.localScale = new Vector2(1,1);
//Time Stop
GameObject.Find ("timer").GetComponent<Timer>().enabled = false;
//Get Exp
SenkouButton senkou = new SenkouButton();
List<BusyoSenkou> senkouList = new List<BusyoSenkou>();
senkouList=senkou.getSenkou ();
for(int i=0;i<senkouList.Count;i++){
int busyoId = senkouList[i].id;
int senkouAmt = senkouList[i].senkou;
Exp exp = new Exp();
//Modify by Cyadougu Kahou
senkouAmt = exp.getExpbyCyadougu(busyoId,senkouAmt);
//Busyo Exp
string tempExp = "exp" + busyoId;
int nowExp = PlayerPrefs.GetInt(tempExp);
int newExp = nowExp + senkouAmt;
PlayerPrefs.SetInt(tempExp, newExp);
//Busyo Lv
int nowLv = PlayerPrefs.GetInt(busyoId.ToString());
int newLv = exp.getLvbyTotalExp(nowLv,newExp);
PlayerPrefs.SetInt(busyoId.ToString(), newLv);
PlayerPrefs.Flush();
}
}
}
}
}