public int getStsAndMakeInstance(int jinkei, int mapId, float rainMinusRatio, float snowMinusRatio) { //Get Status string map = jinkei.ToString() + "map" + mapId; int busyoId = PlayerPrefs.GetInt(map); string busyoString = busyoId.ToString(); int lv = PlayerPrefs.GetInt(busyoString); StatusGet sts = new StatusGet(); BusyoInfoGet busyoInfo = new BusyoInfoGet(); int shipId = busyoInfo.getShipId(busyoId); int hp = sts.getHp(busyoId, lv); int atk = sts.getAtk(busyoId, lv); int dfc = sts.getDfc(busyoId, lv); int spd = sts.getSpd(busyoId, lv); string busyoName = sts.getBusyoName(busyoId); ArrayList senpouArray = sts.getSenpou(busyoId, false); //Make Average Senpou Lv totalSenpouLv = totalSenpouLv + (int)senpouArray[8]; //Weather Minus if (rainMinusRatio != 0 || snowMinusRatio != 0) { float tmp = (float)spd * 0.5f; if (tmp < 1) { tmp = 1; } spd = Mathf.FloorToInt(tmp); } //Soudaisyo if (busyoId == soudaisyo) { soudaisyoHp = hp; soudaisyoAtk = atk; soudaisyoDfc = dfc; soudaisyoSpd = spd / 10; } //Boubi int boubi = 0; if (activeStageId == 0) { //Passive boubi = PlayerPrefs.GetInt("activeBoubi", 0); } //View Object & pass status to it. PlayerInstance inst = new PlayerInstance(); inst.makeKaisenInstance(busyoId, shipId, mapId, hp, atk, dfc, spd, senpouArray, busyoName, soudaisyo, boubi, false, 0, 0); return(busyoId); }
public void getEnemyStsAndMakeInstance(int linkNo, int mapId, float rainMinusRatio, float snowMinusRatio) { string map = "emap" + mapId; int busyoId = PlayerPrefs.GetInt(map); int activeBusyoLv = PlayerPrefs.GetInt("activeBusyoLv"); int activeButaiQty = PlayerPrefs.GetInt("activeButaiQty"); int activeButaiLv = PlayerPrefs.GetInt("activeButaiLv"); StatusGet sts = new StatusGet(); BusyoInfoGet info = new BusyoInfoGet(); int shipId = info.getShipId(busyoId); int hp = sts.getHp(busyoId, activeBusyoLv); int atk = sts.getAtk(busyoId, activeBusyoLv); int dfc = sts.getDfc(busyoId, activeBusyoLv); int spd = sts.getSpd(busyoId, activeBusyoLv); string busyoName = sts.getBusyoName(busyoId); string heisyu = sts.getHeisyu(busyoId); int playerBusyoQty = PlayerPrefs.GetInt("jinkeiBusyoQty"); aveSenpouLv = Mathf.CeilToInt(totalSenpouLv / playerBusyoQty); ArrayList senpouArray = sts.getEnemySenpou(busyoId, aveSenpouLv, ""); //Weather Minus if (rainMinusRatio != 0 || snowMinusRatio != 0) { float tmp = (float)spd * 0.5f; if (tmp < 1) { tmp = 1; } spd = Mathf.FloorToInt(tmp); } bool enemyTaisyoFlg = false; if (busyoId == enemySoudaisyo) { enemyTaisyoFlg = true; } //View Object & pass status to it. EnemyInstance inst = new EnemyInstance(); inst.makeKaisenInstance(mapId, busyoId, shipId, activeButaiLv, heisyu, activeButaiQty, hp, atk, dfc, spd, busyoName, linkNo, enemyTaisyoFlg, senpouArray); }
public void Start() { //Get Temp Kuni Id & Stage Id activeKuniId = PlayerPrefs.GetInt ("activeKuniId"); string temp = "naisei" + activeKuniId.ToString (); /*Initial Setting*/ //Kuni Name & jyosyu string title = ""; string kuniName = PlayerPrefs.GetString ("activeKuniName"); string jyosyuTemp = "jyosyu" + activeKuniId; //Clear Image foreach ( Transform n in GameObject.Find ("JyosyuImage").transform){ GameObject.Destroy(n.gameObject); } if (PlayerPrefs.HasKey (jyosyuTemp)) { //Jyosyu Exist jyosyuId = PlayerPrefs.GetInt (jyosyuTemp); string busyoPath = "Prefabs/Player/Unit/" + jyosyuId; GameObject busyo = Instantiate (Resources.Load (busyoPath)) as GameObject; busyo.transform.SetParent (GameObject.Find ("JyosyuImage").transform); busyo.transform.localScale = new Vector2 (4, 4); busyo.GetComponent<DragHandler>().enabled = false; RectTransform busyo_transform = busyo.GetComponent<RectTransform>(); busyo_transform.anchoredPosition = new Vector3(40,40,0); busyo_transform.sizeDelta = new Vector2( 23, 23); foreach(Transform n in busyo.transform){ GameObject.Destroy(n.gameObject); } StatusGet sts = new StatusGet(); string jyosyuName = sts.getBusyoName(jyosyuId); title = kuniName + "・" + jyosyuName; //Ninmei Button GameObject btn = GameObject.Find ("Ninmei").gameObject; btn.GetComponent<Ninmei>().kaininFlg = true; btn.transform.FindChild("NinmeiText").GetComponent<Text>().text = "城主解任"; btn.GetComponent<Ninmei>().jyosyuId = jyosyuId; btn.GetComponent<Ninmei>().jyosyuName = jyosyuName; } else { //Jyosyu Not Exist title = kuniName + "・蔵入地"; //Ninmei Button GameObject btn = GameObject.Find ("Ninmei").gameObject; btn.GetComponent<Ninmei>().kaininFlg = false; btn.transform.FindChild("NinmeiText").GetComponent<Text>().text = "城主任命"; } GameObject.Find ("StageNameValue").GetComponent<Text> ().text = title; //Money int money = PlayerPrefs.GetInt("money"); GameObject.Find ("MoneyValue").GetComponent<Text> ().text = money.ToString(); //Hyourou int hyourou = PlayerPrefs.GetInt("hyourou"); GameObject.Find ("HyourouCurrentValue").GetComponent<Text> ().text = hyourou.ToString(); //HyourouMax int hyourouMax = PlayerPrefs.GetInt("hyourouMax"); GameObject.Find ("HyourouMaxValue").GetComponent<Text> ().text = hyourouMax.ToString(); /*Open Panel*/ //Clear Previous Panel foreach ( Transform n in GameObject.Find ("NaiseiView").transform){ GameObject.Destroy(n.gameObject); } //Clear Previous Mask Panel foreach ( Transform n in GameObject.Find ("MaskView").transform){ GameObject.Destroy(n.gameObject); } //Open Panel & MaskPanel panelByShiro(activeKuniId); panelByKuniLv(); if (PlayerPrefs.HasKey (temp)) { /*initial setting*/ string naiseiString = PlayerPrefs.GetString (temp); List<string> naiseiList = new List<string>(); char[] delimiterChars = {','}; naiseiList = new List<string>(naiseiString.Split (delimiterChars)); /*Naisei Bldg Handling*/ char[] delimiterChars2 = {':'}; List<string> deletePanelList = new List<string>(); for(int i=1; i<naiseiList.Count;i++){ List<string> naiseiContentList = new List<string>(); naiseiContentList = new List<string>(naiseiList[i].Split (delimiterChars2)); if(naiseiContentList[0] != "0"){ //Exist Entity_naisei_mst naiseiMst = Resources.Load ("Data/naisei_mst") as Entity_naisei_mst; string bldgRank = ""; if(int.Parse(naiseiContentList[1])<8){ bldgRank = "s"; }else if(int.Parse(naiseiContentList[1]) < 15){ bldgRank = "m"; }else if(15 <= int.Parse(naiseiContentList[1])){ bldgRank = "l"; } //Add Delete Target deletePanelList.Add(i.ToString()); //Make New Panel string type = naiseiMst.param [int.Parse(naiseiContentList[0])].code; string bldg = type + "_" + bldgRank; string bldgPath = "Prefabs/Naisei/Bldg/" + bldg; GameObject bldgObj = Instantiate (Resources.Load (bldgPath)) as GameObject; bldgObj.transform.parent = GameObject.Find ("NaiseiView").transform; bldgObj.transform.localScale = new Vector3 (1, 1, 1); setBldg(bldgObj, i); bldgObj.name = i.ToString(); bldgObj.GetComponent<AreaButton>().blank = false; bldgObj.GetComponent<AreaButton>().type = type; bldgObj.GetComponent<AreaButton>().lv = naiseiContentList[1]; bldgObj.GetComponent<AreaButton>().naiseiId = int.Parse(naiseiContentList[0]); //Effect by Level List<int> naiseiEffectList = new List<int>(); naiseiEffectList = getNaiseiList(type, int.Parse(naiseiContentList[1])); bldgObj.GetComponent<AreaButton>().effect = naiseiEffectList[0]; bldgObj.GetComponent<AreaButton>().effectNextLv = naiseiEffectList[1]; bldgObj.GetComponent<AreaButton>().moneyNextLv = naiseiEffectList[2]; bldgObj.GetComponent<AreaButton>().requiredHyourou =naiseiMst.param [int.Parse(naiseiContentList[0])].hyourou; bldgObj.GetComponent<AreaButton>().naiseiName =naiseiMst.param [int.Parse(naiseiContentList[0])].name; //Status if(type == "shop" || type == "kouzan"){ syogyo = syogyo + naiseiEffectList[0]; }else if(type == "ta"){ nogyo = nogyo + naiseiEffectList[0]; }else if(type == "yr" ||type == "kb"||type == "tp" ||type == "ym"){ gunjyu = gunjyu + naiseiEffectList[0]; }else if(type == "ashigaru"){ ashigaru = ashigaru + naiseiEffectList[0]; }else if(type == "toride"){ boubi = boubi + naiseiEffectList[0]; }else{ Debug.Log ("Not Yet"); } } } //Clear Duplicated Panel foreach ( Transform n in GameObject.Find ("NaiseiView").transform){ if(deletePanelList.Contains(n.name)){ if(n.tag == "Area"){ GameObject.Destroy(n.gameObject); } } } /*shiro setting*/ string rank = ""; if(int.Parse(naiseiList[0])<8){ rank = "s"; setShiro(rank, naiseiList[0]); }else if(int.Parse(naiseiList[0]) < 15){ rank = "m"; setShiro(rank, naiseiList[0]); }else if(15 <= int.Parse(naiseiList[0])){ rank = "l"; setShiro(rank, naiseiList[0]); } string maskPath = "Prefabs/Naisei/MaskPanel"; GameObject maskPanel = Instantiate (Resources.Load (maskPath)) as GameObject; maskPanel.transform.parent = GameObject.Find ("MaskView").transform; maskPanel.transform.localScale = new Vector3 (1, 1, 1); RectTransform maskPanel_transform = maskPanel.GetComponent<RectTransform>(); maskPanel_transform.anchoredPosition = new Vector2(0,-20); maskPanel.name = "shiro_" + rank; //Status Handling //Status Jyosyu Modification if (PlayerPrefs.HasKey (jyosyuTemp)) { StatusGet sts = new StatusGet(); int lv = PlayerPrefs.GetInt (jyosyuId.ToString()); float naiseiSts = (float)sts.getDfc(jyosyuId,lv); float hpSts = (float)sts.getHp(jyosyuId,lv); float atkSts = (float)sts.getAtk(jyosyuId,lv); float boubiSts = (hpSts + atkSts)/2; float tempSyogyo = (float)syogyo; tempSyogyo = tempSyogyo + (tempSyogyo * naiseiSts/200); float tempNogyo = (float)nogyo; tempNogyo = tempNogyo + (tempNogyo * naiseiSts/200); float tempBoubi = (float)boubi; tempBoubi = tempBoubi + (tempBoubi * naiseiSts/200); syogyo = (int)tempSyogyo; nogyo = (int)tempNogyo; boubi = (int)tempBoubi; } GameObject.Find("SyogyoValue").GetComponent<Text>().text = syogyo.ToString(); GameObject.Find("NougyoValue").GetComponent<Text>().text = nogyo.ToString(); GameObject.Find("GunjyuValue").GetComponent<Text>().text = gunjyu.ToString(); GameObject.Find("AshigaruValue").GetComponent<Text>().text = ashigaru.ToString(); GameObject.Find("BoubiValue").GetComponent<Text>().text = boubi.ToString(); GameObject.Find("BukkyoValue").GetComponent<Text>().text = bukkyo.ToString(); GameObject.Find("KirisutoValue").GetComponent<Text>().text = kirisuto.ToString(); GameObject.Find("BunkaValue").GetComponent<Text>().text = bunka.ToString(); } else { //Error Debug.Log ("ERROR"); } }
public void getEnemyStsAndMakeInstance(int linkNo, int mapId, float mntMinusRatio, float seaMinusRatio, float rainMinusRatio, float snowMinusRatio){ String map = "emap" + mapId; int busyoId = PlayerPrefs.GetInt(map); int activeBusyoLv = PlayerPrefs.GetInt ("activeBusyoLv"); int activeButaiQty = PlayerPrefs.GetInt ("activeButaiQty"); int activeButaiLv = PlayerPrefs.GetInt ("activeButaiLv"); StatusGet sts = new StatusGet (); BusyoInfoGet info = new BusyoInfoGet(); int hp = sts.getHp (busyoId, activeBusyoLv); int atk = sts.getAtk (busyoId, activeBusyoLv); int dfc = sts.getDfc (busyoId, activeBusyoLv); int spd = sts.getSpd (busyoId, activeBusyoLv); string busyoName = sts.getBusyoName (busyoId); string heisyu = sts.getHeisyu (busyoId); ArrayList senpouArray = sts.getSenpou (busyoId); //Map & Weather Minus if (mntMinusRatio != 0) { if (heisyu == "KB") { float tmp = (float)spd * mntMinusRatio; if (tmp < 1) { tmp = 1; } spd = Mathf.FloorToInt (tmp); } }else if (seaMinusRatio != 0) { if (heisyu == "TP") { float tmp = (float)dfc * seaMinusRatio; if (tmp < 1) { tmp = 1; } dfc = Mathf.FloorToInt (tmp); }else if (heisyu == "YM") { float tmp = (float)dfc * seaMinusRatio; if (tmp < 1) { tmp = 1; } dfc = Mathf.FloorToInt (tmp); } } if (rainMinusRatio != 0) { if (heisyu == "TP") { float tmp = (float)atk * rainMinusRatio; if (tmp < 1) { tmp = 1; } atk = Mathf.FloorToInt (tmp); }else if (heisyu == "YM") { float tmp = (float)atk * rainMinusRatio; if (tmp < 1) { tmp = 1; } atk = Mathf.FloorToInt (tmp); } }else if(snowMinusRatio != 0) { float tmp = (float)spd * 0.5f; if (tmp < 1) { tmp = 1; } spd = Mathf.FloorToInt (tmp); if (heisyu == "TP") { float tmp2 = (float)atk * snowMinusRatio; if (tmp2 < 1) { tmp2 = 1; } atk = Mathf.FloorToInt (tmp2); }else if (heisyu == "YM") { float tmp2 = (float)atk * snowMinusRatio; if (tmp2 < 1) { tmp2 = 1; } atk = Mathf.FloorToInt (tmp2); }else if (heisyu == "KB") { float tmp2 = (float)dfc * snowMinusRatio; if (tmp2 < 1) { tmp2 = 1; } dfc = Mathf.FloorToInt (tmp2); } } bool enemyTaisyoFlg = false; if (busyoId == enemySoudaisyo) { enemyTaisyoFlg = true; } //View Object & pass status to it. EnemyInstance inst = new EnemyInstance (); inst.makeInstance(mapId, busyoId, activeButaiLv, heisyu, activeButaiQty, hp, atk, dfc, spd, busyoName,linkNo,enemyTaisyoFlg); }
public int getStsAndMakeInstance(int jinkei, int mapId, float mntMinusRatio, float seaMinusRatio, float rainMinusRatio, float snowMinusRatio){ String map = jinkei.ToString() + "map" + mapId; //Get Status int busyoId = PlayerPrefs.GetInt(map); string busyoString = busyoId.ToString(); int lv =PlayerPrefs.GetInt(busyoString); StatusGet sts = new StatusGet (); int hp = sts.getHp (busyoId, lv); int atk = sts.getAtk (busyoId, lv); int dfc = sts.getDfc (busyoId, lv); int spd = sts.getSpd (busyoId, lv); string busyoName = sts.getBusyoName (busyoId); ArrayList senpouArray = sts.getSenpou (busyoId); //Map & Weather Minus string heisyu = sts.getHeisyu (busyoId); if (mntMinusRatio != 0) { if (heisyu == "KB") { float tmp = (float)spd * mntMinusRatio; if (tmp < 1) { tmp = 1; } spd = Mathf.FloorToInt (tmp); } }else if (seaMinusRatio != 0) { if (heisyu == "TP") { float tmp = (float)dfc * seaMinusRatio; if (tmp < 1) { tmp = 1; } dfc = Mathf.FloorToInt (tmp); }else if (heisyu == "YM") { float tmp = (float)dfc * seaMinusRatio; if (tmp < 1) { tmp = 1; } dfc = Mathf.FloorToInt (tmp); } } if (rainMinusRatio != 0) { if (heisyu == "TP") { float tmp = (float)atk * rainMinusRatio; if (tmp < 1) { tmp = 1; } atk = Mathf.FloorToInt (tmp); }else if (heisyu == "YM") { float tmp = (float)atk * rainMinusRatio; if (tmp < 1) { tmp = 1; } atk = Mathf.FloorToInt (tmp); } }else if(snowMinusRatio != 0) { float tmp = (float)spd * 0.5f; if (tmp < 1) { tmp = 1; } spd = Mathf.FloorToInt (tmp); if (heisyu == "TP") { float tmp2 = (float)atk * snowMinusRatio; if (tmp2 < 1) { tmp2 = 1; } atk = Mathf.FloorToInt (tmp2); }else if (heisyu == "YM") { float tmp2 = (float)atk * snowMinusRatio; if (tmp2 < 1) { tmp2 = 1; } atk = Mathf.FloorToInt (tmp2); }else if (heisyu == "KB") { float tmp2 = (float)dfc * snowMinusRatio; if (tmp2 < 1) { tmp2 = 1; } dfc = Mathf.FloorToInt (tmp2); } } if (busyoId == soudaisyo) { soudaisyoHp = hp; soudaisyoAtk = atk; soudaisyoDfc = dfc; soudaisyoSpd = spd; } int boubi = 0; if (activeStageId == 0) { //Passive boubi = PlayerPrefs.GetInt("activeBoubi", 0); } //View Object & pass status to it. PlayerInstance inst = new PlayerInstance (); inst.makeInstance (busyoId, mapId, hp, atk, dfc, spd, senpouArray, busyoName, soudaisyo, boubi); return busyoId; }
public void OnClick() { if (name == "YesButton") { /*Tsuihou*/ //Limit Check int myBusyoQty = PlayerPrefs.GetInt("myBusyoQty"); if (myBusyoQty == 1) { //Error Message msg = new Message(); string Text = "御館様、武将を皆追放することは出来ませぬぞ。お家を滅ぼすおつもりか。"; msg.makeMessage (Text); } else { //Delete Data //myBusyo List<string> myBusyo_list = new List<string> (); string myBusyoString = PlayerPrefs.GetString ("myBusyo"); char[] delimiterChars = {','}; myBusyo_list.AddRange (myBusyoString.Split (delimiterChars)); myBusyo_list.Remove(busyoId.ToString()); string newMyBusyoString = ""; string newOnBusyo = myBusyo_list[0]; for(int i=0; i<myBusyo_list.Count;i++){ newMyBusyoString = newMyBusyoString + myBusyo_list[i] + ","; } newMyBusyoString = newMyBusyoString.TrimEnd(','); //kahou List<string> kahou_list = new List<string> (); string kahou = "kahou" + busyoId; string kahouString = PlayerPrefs.GetString (kahou); kahou_list.AddRange(kahouString.Split (delimiterChars)); string availableBugu = PlayerPrefs.GetString ("availableBugu"); string availableKabuto = PlayerPrefs.GetString ("availableKabuto"); string availableGusoku = PlayerPrefs.GetString ("availableGusoku"); string availableMeiba = PlayerPrefs.GetString ("availableMeiba"); string availableCyadougu = PlayerPrefs.GetString ("availableCyadougu"); string availableHeihousyo = PlayerPrefs.GetString ("availableHeihousyo"); string availableChishikisyo = PlayerPrefs.GetString ("availableChishikisyo"); for(int j=0; j<kahou_list.Count;j++){ string kahouId = kahou_list[j]; if(j==0){ //Bugu if(kahouId !="0"){ if(availableBugu != "" && availableBugu != null){ availableBugu = availableBugu + "," + kahouId; }else{ availableBugu = kahouId; } } }else if(j==1){ //Kabuto if(kahouId !="0"){ if(availableKabuto != "" && availableKabuto != null){ availableKabuto = availableKabuto + "," + kahouId; }else{ availableKabuto = kahouId; } } }else if(j==2){ //Gusoku if(kahouId !="0"){ if(availableGusoku != "" && availableGusoku != null){ availableGusoku = availableGusoku + "," + kahouId; }else{ availableGusoku = kahouId; } } }else if(j==3){ //Meiba if(kahouId !="0"){ if(availableMeiba != "" && availableMeiba != null){ availableMeiba = availableMeiba + "," + kahouId; }else{ availableMeiba = kahouId; } } }else if(j==4){ //Cyadougu1 if(kahouId !="0"){ if(availableCyadougu != "" && availableCyadougu != null){ availableCyadougu = availableCyadougu + "," + kahouId; }else{ availableCyadougu = kahouId; } } }else if(j==5){ //Cyadougu2 if(kahouId !="0"){ if(availableCyadougu != "" && availableCyadougu != null){ availableCyadougu = availableCyadougu + "," + kahouId; }else{ availableCyadougu = kahouId; } } }else if(j==6){ //Heihousyo if(kahouId !="0"){ if(availableHeihousyo != "" && availableHeihousyo != null){ availableHeihousyo = availableHeihousyo + "," + kahouId; }else{ availableHeihousyo = kahouId; } } }else if(j==7){ //Chishikisyo if(kahouId !="0"){ if(availableChishikisyo != "" && availableChishikisyo != null){ availableChishikisyo = availableChishikisyo + "," + kahouId; }else{ availableChishikisyo = kahouId; } } } } //OK PlayerPrefs.SetString("myBusyo",newMyBusyoString); PlayerPrefs.DeleteKey(busyoId.ToString()); string hei = "hei" + busyoId; PlayerPrefs.DeleteKey(hei); string senpou = "senpou" + busyoId; PlayerPrefs.DeleteKey(senpou); string koudou = "kondou" + busyoId; PlayerPrefs.DeleteKey(koudou); PlayerPrefs.SetString ("availableBugu",availableBugu); PlayerPrefs.SetString ("availableKabuto",availableKabuto); PlayerPrefs.SetString ("availableGusoku",availableGusoku); PlayerPrefs.SetString ("availableMeiba",availableMeiba); PlayerPrefs.SetString ("availableCyadougu",availableCyadougu); PlayerPrefs.SetString ("availableHeihousyo",availableHeihousyo); PlayerPrefs.SetString ("availableChishikisyo",availableChishikisyo); PlayerPrefs.DeleteKey(kahou); string exp = "exp" + busyoId; PlayerPrefs.DeleteKey(exp); //jinkei 1map1 ~ 4map25 int oyaId = 1; for(int k=oyaId; k<5; k++){ int koId = 1; for(int l=koId; l<26; l++){ string mapKey = k.ToString() + "map" + l.ToString(); int mapBusyo = PlayerPrefs.GetInt (mapKey); if(mapBusyo == busyoId){ //Delete PlayerPrefs.DeleteKey(mapKey); } } } myBusyoQty = myBusyoQty - 1; PlayerPrefs.SetInt("myBusyoQty",myBusyoQty); PlayerPrefs.Flush(); //Back & Update Destroy(GameObject.Find("TsuihouConfirm")); Destroy(GameObject.Find("Back(Clone)")); MessageBusyo msg = new MessageBusyo(); string tsuihouText = busyoName + "を追放しました。"; string type = "tsuihou"; msg.makeMessage(tsuihouText,busyoId, type); //Now On Busyo Mod. GameObject.Find ("GameScene").GetComponent<NowOnBusyo>().OnBusyo = newOnBusyo; StatusGet sts = new StatusGet(); GameObject.Find ("GameScene").GetComponent<NowOnBusyo>().OnBusyoName = sts.getBusyoName(int.Parse(newOnBusyo)); /*Initialization*/ //BusyoView RonkouScene ronkou = new RonkouScene(); //Delete foreach ( Transform n in GameObject.Find("BusyoView").transform ){ //Busyo Serihu GameObject.Destroy(n.gameObject); } //Create ronkou.createBusyoView(newOnBusyo.ToString()); //BusyoStatus ronkou.createBusyoStatusView(newOnBusyo.ToString()); //Scroll View //Delete foreach ( Transform n in GameObject.Find("Content").transform ){ GameObject.Destroy(n.gameObject); } //Create ArrayList myBusyoList = new ArrayList(); GameObject mainController = GameObject.Find ("GameScene"); string minBusyoId = ""; minBusyoId = ronkou.createScrollView(myBusyoList,minBusyoId,mainController); } }else if(name == "NoButton"){ //Back Destroy(GameObject.Find("TsuihouConfirm")); Destroy(GameObject.Find("Back(Clone)")); } }
public void enemyEngunInstance(string enemyEngunList, float mntMinusRatio, float seaMinusRatio, float rainMinusRatio, float snowMinusRatio) { List <string> daimyoEnguniList = new List <string> (); char[] delimiterChars = { ':' }; char[] delimiterChars2 = { '-' }; if (enemyEngunList.Contains(":")) { daimyoEnguniList = new List <string> (enemyEngunList.Split(delimiterChars)); } else { daimyoEnguniList.Add(enemyEngunList); } for (int i = 0; i < daimyoEnguniList.Count; i++) { StatusGet sts = new StatusGet(); string daimyoEngunString = daimyoEnguniList[i]; List <string> unitEnguniList = new List <string> (); unitEnguniList = new List <string> (daimyoEngunString.Split(delimiterChars2)); int busyoId = int.Parse(unitEnguniList[1]); string heisyu = sts.getHeisyu(busyoId); if (busyoId != 0) { int busyoLv = int.Parse(unitEnguniList[2]); int butaiQty = int.Parse(unitEnguniList[3]); int butaiLv = int.Parse(unitEnguniList[4]); int hp = sts.getHp(busyoId, busyoLv); int atk = sts.getAtk(busyoId, busyoLv); int dfc = sts.getDfc(busyoId, busyoLv); int spd = sts.getSpd(busyoId, busyoLv); string busyoName = sts.getBusyoName(busyoId); int aveSenpouLv = 0; if (Application.loadedLevelName != "kaisen") { aveSenpouLv = GameObject.Find("GameScene").GetComponent <GameScene> ().aveSenpouLv; } else { aveSenpouLv = GameObject.Find("GameScene").GetComponent <KaisenScene>().aveSenpouLv; } ArrayList senpouArray = sts.getEnemySenpou(busyoId, aveSenpouLv, ""); if (mntMinusRatio != 0) { if (heisyu == "KB") { float tmp = (float)spd * mntMinusRatio; if (tmp < 1) { tmp = 1; } spd = Mathf.FloorToInt(tmp); } } else if (seaMinusRatio != 0) { if (heisyu == "TP") { float tmp = (float)dfc * seaMinusRatio; if (tmp < 1) { tmp = 1; } dfc = Mathf.FloorToInt(tmp); } else if (heisyu == "YM") { float tmp = (float)dfc * seaMinusRatio; if (tmp < 1) { tmp = 1; } dfc = Mathf.FloorToInt(tmp); } } if (rainMinusRatio != 0) { if (heisyu == "TP") { float tmp = (float)atk * rainMinusRatio; if (tmp < 1) { tmp = 1; } atk = Mathf.FloorToInt(tmp); } else if (heisyu == "YM") { float tmp = (float)atk * rainMinusRatio; if (tmp < 1) { tmp = 1; } atk = Mathf.FloorToInt(tmp); } } else if (snowMinusRatio != 0) { float tmp = (float)spd * 0.5f; if (tmp < 1) { tmp = 1; } spd = Mathf.FloorToInt(tmp); if (heisyu == "TP") { float tmp2 = (float)atk * snowMinusRatio; if (tmp2 < 1) { tmp2 = 1; } atk = Mathf.FloorToInt(tmp2); } else if (heisyu == "YM") { float tmp2 = (float)atk * snowMinusRatio; if (tmp2 < 1) { tmp2 = 1; } atk = Mathf.FloorToInt(tmp2); } else if (heisyu == "KB") { float tmp2 = (float)dfc * snowMinusRatio; if (tmp2 < 1) { tmp2 = 1; } dfc = Mathf.FloorToInt(tmp2); } } //View Object & pass status to it. EnemyInstance inst = new EnemyInstance(); BusyoInfoGet info = new BusyoInfoGet(); string ch_type = info.getHeisyu(busyoId); int mapId = 22; if (Application.loadedLevelName != "kaisen") { inst.makeInstance(mapId, busyoId, butaiLv, ch_type, butaiQty, hp, atk, dfc, spd, busyoName, 0, false, senpouArray, ""); } else { BusyoInfoGet busyoScript = new BusyoInfoGet(); int shipId = busyoScript.getShipId(busyoId); inst.makeKaisenInstance(mapId, busyoId, shipId, butaiLv, ch_type, butaiQty, hp, atk, dfc, spd, busyoName, 0, false, senpouArray); } } } Message msg = new Message(); msg.makeKassenMessage(msg.getMessage(131)); }
public void playerEngunInstance(string playerEngunList, float mntMinusRatio, float seaMinusRatio, float rainMinusRatio, float snowMinusRatio) { List <string> daimyoEnguniList = new List <string> (); char[] delimiterChars = { ':' }; char[] delimiterChars2 = { '-' }; if (playerEngunList.Contains(":")) { daimyoEnguniList = new List <string> (playerEngunList.Split(delimiterChars)); } else { daimyoEnguniList.Add(playerEngunList); } for (int i = 0; i < daimyoEnguniList.Count; i++) { StatusGet sts = new StatusGet(); string daimyoEngunString = daimyoEnguniList[i]; List <string> unitEnguniList = new List <string> (); unitEnguniList = new List <string> (daimyoEngunString.Split(delimiterChars2)); int busyoId = int.Parse(unitEnguniList[1]); string heisyu = sts.getHeisyu(busyoId); if (busyoId != 0) { int busyoLv = int.Parse(unitEnguniList[2]); int butaiQty = int.Parse(unitEnguniList[3]); int butaiLv = int.Parse(unitEnguniList[4]); int hp = sts.getHp(busyoId, busyoLv); int atk = sts.getAtk(busyoId, busyoLv); int dfc = sts.getDfc(busyoId, busyoLv); int spd = sts.getSpd(busyoId, busyoLv); string busyoName = sts.getBusyoName(busyoId); ArrayList senpouArray = sts.getSenpou(busyoId, true); if (mntMinusRatio != 0) { if (heisyu == "KB") { float tmp = (float)spd * mntMinusRatio; if (tmp < 1) { tmp = 1; } spd = Mathf.FloorToInt(tmp); } } else if (seaMinusRatio != 0) { if (heisyu == "TP") { float tmp = (float)dfc * seaMinusRatio; if (tmp < 1) { tmp = 1; } dfc = Mathf.FloorToInt(tmp); } else if (heisyu == "YM") { float tmp = (float)dfc * seaMinusRatio; if (tmp < 1) { tmp = 1; } dfc = Mathf.FloorToInt(tmp); } } if (rainMinusRatio != 0) { if (heisyu == "TP") { float tmp = (float)atk * rainMinusRatio; if (tmp < 1) { tmp = 1; } atk = Mathf.FloorToInt(tmp); } else if (heisyu == "YM") { float tmp = (float)atk * rainMinusRatio; if (tmp < 1) { tmp = 1; } atk = Mathf.FloorToInt(tmp); } } else if (snowMinusRatio != 0) { float tmp = (float)spd * 0.5f; if (tmp < 1) { tmp = 1; } spd = Mathf.FloorToInt(tmp); if (heisyu == "TP") { float tmp2 = (float)atk * snowMinusRatio; if (tmp2 < 1) { tmp2 = 1; } atk = Mathf.FloorToInt(tmp2); } else if (heisyu == "YM") { float tmp2 = (float)atk * snowMinusRatio; if (tmp2 < 1) { tmp2 = 1; } atk = Mathf.FloorToInt(tmp2); } else if (heisyu == "KB") { float tmp2 = (float)dfc * snowMinusRatio; if (tmp2 < 1) { tmp2 = 1; } dfc = Mathf.FloorToInt(tmp2); } } //View Object & pass status to it. PlayerInstance inst = new PlayerInstance(); if (Application.loadedLevelName != "kaisen") { inst.makeEngunInstance(busyoId, hp, atk, dfc, spd, senpouArray, busyoName, butaiQty, butaiLv); } else { BusyoInfoGet busyoScript = new BusyoInfoGet(); int shipId = busyoScript.getShipId(busyoId); inst.makeKaisenInstance(busyoId, shipId, 25, hp, atk, dfc, spd, senpouArray, busyoName, butaiQty, butaiLv, true, butaiQty, butaiLv); } } } //auto check if (GameObject.Find("AutoBtn")) { if (GameObject.Find("AutoBtn").GetComponent <AutoAttack>().onFlg) { AutoAttack autoScript = new AutoAttack(); autoScript.changeAutoScript(); } } Message msg = new Message(); msg.makeKassenMessage(msg.getMessage(130)); }
public void Start () { //Get Temp Kuni Id & Stage Id activeKuniId = PlayerPrefs.GetInt ("activeKuniId"); string temp = "naisei" + activeKuniId.ToString (); /*Initial Setting*/ //Kuni Name & jyosyu string title = ""; string kuniName = PlayerPrefs.GetString ("activeKuniName"); string jyosyuTemp = "jyosyu" + activeKuniId; //Clear Image foreach ( Transform n in GameObject.Find ("JyosyuImage").transform){ GameObject.Destroy(n.gameObject); } if (PlayerPrefs.HasKey (jyosyuTemp)) { //Jyosyu Exist jyosyuId = PlayerPrefs.GetInt (jyosyuTemp); string busyoPath = "Prefabs/Player/Unit/" + jyosyuId; GameObject busyo = Instantiate (Resources.Load (busyoPath)) as GameObject; busyo.transform.SetParent (GameObject.Find ("JyosyuImage").transform); busyo.transform.localScale = new Vector2 (4, 4); busyo.GetComponent<DragHandler>().enabled = false; RectTransform busyo_transform = busyo.GetComponent<RectTransform>(); busyo_transform.anchoredPosition3D = new Vector3(40,40,0); busyo_transform.sizeDelta = new Vector2( 23, 23); foreach(Transform n in busyo.transform){ GameObject.Destroy(n.gameObject); } StatusGet sts = new StatusGet(); string jyosyuName = sts.getBusyoName(jyosyuId); title = kuniName + "・" + jyosyuName; //Ninmei Button GameObject btn = GameObject.Find ("Ninmei").gameObject; btn.GetComponent<Ninmei>().kaininFlg = true; btn.transform.FindChild("NinmeiText").GetComponent<Text>().text = "城主解任"; btn.GetComponent<Ninmei>().jyosyuId = jyosyuId; btn.GetComponent<Ninmei>().jyosyuName = jyosyuName; } else { //Jyosyu Not Exist title = kuniName + "・蔵入地"; //Ninmei Button GameObject btn = GameObject.Find ("Ninmei").gameObject; btn.GetComponent<Ninmei>().kaininFlg = false; btn.transform.FindChild("NinmeiText").GetComponent<Text>().text = "城主任命"; } GameObject.Find ("StageNameValue").GetComponent<Text> ().text = title; //Money int money = PlayerPrefs.GetInt("money"); GameObject.Find ("MoneyValue").GetComponent<Text> ().text = money.ToString(); //Hyourou int hyourou = PlayerPrefs.GetInt("hyourou"); GameObject.Find ("HyourouCurrentValue").GetComponent<Text> ().text = hyourou.ToString(); //HyourouMax int hyourouMax = PlayerPrefs.GetInt("hyourouMax"); GameObject.Find ("HyourouMaxValue").GetComponent<Text> ().text = hyourouMax.ToString(); //Naisei Icon List KuniInfo kuni = new KuniInfo (); shigen = kuni.getKuniNaisei (activeKuniId); //Sea or Tree isSeaFlg = kuni.getKuniIsSeaFlg (activeKuniId); GameObject otherObj = GameObject.Find ("Other").gameObject; if (isSeaFlg) { if(otherObj.transform.FindChild("treeUpper") != null){ otherObj.transform.FindChild("treeUpper").gameObject.SetActive(false); } } else { if(otherObj.transform.FindChild("sea") != null){ otherObj.transform.FindChild("sea").gameObject.SetActive(false); } } /*Open Panel*/ //Clear Previous Panel foreach ( Transform n in GameObject.Find ("NaiseiView").transform){ GameObject.Destroy(n.gameObject); } //Clear Previous Mask Panel foreach ( Transform n in GameObject.Find ("MaskView").transform){ GameObject.Destroy(n.gameObject); } //Open Panel & MaskPanel panelByShiro(activeKuniId); panelByKuniLv(); if (PlayerPrefs.HasKey (temp)) { /*initial setting*/ string naiseiString = PlayerPrefs.GetString (temp); List<string> naiseiList = new List<string>(); char[] delimiterChars = {','}; naiseiList = new List<string>(naiseiString.Split (delimiterChars)); /*Naisei Bldg Handling*/ char[] delimiterChars2 = {':'}; List<string> deletePanelList = new List<string>(); Entity_naisei_mst naiseiMst = Resources.Load ("Data/naisei_mst") as Entity_naisei_mst; for(int i=1; i<naiseiList.Count;i++){ List<string> naiseiContentList = new List<string>(); naiseiContentList = new List<string>(naiseiList[i].Split (delimiterChars2)); if(naiseiContentList[0] != "0"){ //Exist string bldgRank = ""; if(int.Parse(naiseiContentList[1])<8){ bldgRank = "s"; }else if(int.Parse(naiseiContentList[1]) < 15){ bldgRank = "m"; }else if(15 <= int.Parse(naiseiContentList[1])){ bldgRank = "l"; } //Add Delete Target deletePanelList.Add(i.ToString()); //Make New Panel string type = naiseiMst.param [int.Parse(naiseiContentList[0])].code; string bldg = type + "_" + bldgRank; string bldgPath = "Prefabs/Naisei/Bldg/" + bldg; GameObject bldgObj = Instantiate (Resources.Load (bldgPath)) as GameObject; bldgObj.transform.parent = GameObject.Find ("NaiseiView").transform; bldgObj.transform.localScale = new Vector3 (1, 1, 1); setBldg(bldgObj, i); bldgObj.name = i.ToString(); bldgObj.GetComponent<AreaButton>().blank = false; bldgObj.GetComponent<AreaButton>().type = type; bldgObj.GetComponent<AreaButton>().lv = naiseiContentList[1]; bldgObj.GetComponent<AreaButton>().naiseiId = int.Parse(naiseiContentList[0]); //Effect by Level List<int> naiseiEffectList = new List<int>(); naiseiEffectList = getNaiseiList(type, int.Parse(naiseiContentList[1])); if(type != "kzn"){ if(type != "yr" &&type != "kb"&&type != "tp" &&type != "ym" &&type !="snb"){ bldgObj.GetComponent<AreaButton>().effect = naiseiEffectList[0]; bldgObj.GetComponent<AreaButton>().effectNextLv = naiseiEffectList[1]; }else{ bldgObj.GetComponent<AreaButton>().effect = naiseiEffectList[0] * 2; bldgObj.GetComponent<AreaButton>().effectNextLv = naiseiEffectList[1] * 2; } }else{ bldgObj.GetComponent<AreaButton>().effect = naiseiEffectList[0] * 4; bldgObj.GetComponent<AreaButton>().effectNextLv = naiseiEffectList[1] * 4; } bldgObj.GetComponent<AreaButton>().moneyNextLv = naiseiEffectList[2]; bldgObj.GetComponent<AreaButton>().requiredHyourou =naiseiMst.param [int.Parse(naiseiContentList[0])].hyourou; bldgObj.GetComponent<AreaButton>().naiseiName =naiseiMst.param [int.Parse(naiseiContentList[0])].name; //Status if(type == "shop"){ syogyo = syogyo + naiseiEffectList[0]; }else if(type == "ta"){ nogyo = nogyo + naiseiEffectList[0]; }else if(type == "yr" ||type == "kb"||type == "tp" ||type == "ym"||type == "snb"){ int tempCalc = naiseiEffectList[0] * 2; gunjyu = gunjyu + tempCalc; }else if(type == "ashigaru"){ ashigaru = ashigaru + naiseiEffectList[0]; }else if(type == "trd"){ boubi = boubi + naiseiEffectList[0]; }else if(type == "kzn"){ int tempCalc = naiseiEffectList[0] * 4; syogyo = syogyo + tempCalc; }else if(type == "nbn"){ int tempCalc = naiseiEffectList[0]; kirisuto = kirisuto + tempCalc; }else if(type == "kgy"){ int tempCalc = naiseiEffectList[0]; bunka = bunka + tempCalc; }else if(type == "bky"){ int tempCalc = naiseiEffectList[0]; bukkyo = bukkyo + tempCalc; }else if(type == "hsy"){ int tempCalc = naiseiEffectList[0]; ashigaru = ashigaru + tempCalc; }else{ Debug.Log ("Not Yet"); } } } //Clear Duplicated Panel foreach ( Transform n in GameObject.Find ("NaiseiView").transform){ if(deletePanelList.Contains(n.name)){ if(n.tag == "Area"){ GameObject.Destroy(n.gameObject); } } } /*shiro setting*/ string rank = ""; if(int.Parse(naiseiList[0])<8){ rank = "s"; setShiro(rank, naiseiList[0]); }else if(int.Parse(naiseiList[0]) < 15){ rank = "m"; setShiro(rank, naiseiList[0]); }else if(15 <= int.Parse(naiseiList[0])){ rank = "l"; setShiro(rank, naiseiList[0]); } string maskPath = "Prefabs/Naisei/MaskPanel"; GameObject maskPanel = Instantiate (Resources.Load (maskPath)) as GameObject; maskPanel.transform.parent = GameObject.Find ("MaskView").transform; maskPanel.transform.localScale = new Vector3 (1, 1, 1); RectTransform maskPanel_transform = maskPanel.GetComponent<RectTransform>(); maskPanel_transform.anchoredPosition3D = new Vector3(0,-20,0); maskPanel.name = "shiro_" + rank; //Status Handling //Status Jyosyu Modification if (PlayerPrefs.HasKey (jyosyuTemp)) { StatusGet sts = new StatusGet(); int lv = PlayerPrefs.GetInt (jyosyuId.ToString()); float naiseiSts = (float)sts.getDfc(jyosyuId,lv); float hpSts = (float)sts.getHp(jyosyuId,lv); float atkSts = (float)sts.getAtk(jyosyuId,lv); float boubiSts = (hpSts + atkSts)/2; float tempSyogyo = (float)syogyo; tempSyogyo = tempSyogyo + (tempSyogyo * naiseiSts/200); float tempNogyo = (float)nogyo; tempNogyo = tempNogyo + (tempNogyo * naiseiSts/200); float tempBoubi = (float)boubi; tempBoubi = tempBoubi + (tempBoubi * naiseiSts/200); syogyo = (int)tempSyogyo; nogyo = (int)tempNogyo; boubi = (int)tempBoubi; } GameObject.Find("SyogyoValue").GetComponent<Text>().text = syogyo.ToString(); GameObject.Find("NougyoValue").GetComponent<Text>().text = nogyo.ToString(); GameObject.Find("GunjyuValue").GetComponent<Text>().text = gunjyu.ToString(); GameObject.Find("AshigaruValue").GetComponent<Text>().text = ashigaru.ToString(); GameObject.Find("BoubiValue").GetComponent<Text>().text = boubi.ToString(); GameObject.Find("BukkyoValue").GetComponent<Text>().text = bukkyo.ToString(); GameObject.Find("KirisutoValue").GetComponent<Text>().text = kirisuto.ToString(); GameObject.Find("BunkaValue").GetComponent<Text>().text = bunka.ToString(); GameObject.Find("BukkyoValue").GetComponent<Text>().text = bukkyo.ToString(); //jyosyu status update if (PlayerPrefs.HasKey (jyosyuTemp)) { int jyosyuId = PlayerPrefs.GetInt (jyosyuTemp); string heiTmp = "jyosyuHei" + jyosyuId; PlayerPrefs.SetInt (heiTmp,ashigaru); } string boubiTmp = "boubi" + activeKuniId; PlayerPrefs.SetInt (boubiTmp,boubi); } else { //Error Debug.Log ("ERROR"); } /***************************/ /*Tabibito Controller Start*/ /***************************/ tabibitoObj = GameObject.Find ("Tabibito").gameObject; loginTemp = "naiseiLoginDate" + activeKuniId.ToString (); string loginTimeString = PlayerPrefs.GetString (loginTemp); if (loginTimeString == null || loginTimeString == "") { loginTimeString = System.DateTime.Today.ToString (); PlayerPrefs.SetString (loginTemp,loginTimeString); PlayerPrefs.Flush(); } System.DateTime loginTime = System.DateTime.Parse (loginTimeString); System.TimeSpan span = System.DateTime.Today - loginTime; double spanDay = span.TotalDays; string counterTemp = "naiseiTabibitoCounter" + activeKuniId.ToString (); if (spanDay >= 1) { //Reset PlayerPrefs.SetInt (counterTemp,0); PlayerPrefs.Flush(); counter = 0; }else{ //Get Counted No counter = PlayerPrefs.GetInt (counterTemp,0); } //Set Tabibito Max total = (boubi + bukkyo + kirisuto + bunka)/10; remain = total - counter; tabibitoObj.transform.FindChild ("TabibitoMaxValue").GetComponent<Text> ().text = total.ToString (); tabibitoObj.transform.FindChild ("TabibitoCountDownValue").GetComponent<Text> ().text = remain.ToString (); /***************************/ /*Tabibito Controller End */ /***************************/ }
public void enemyEngunInstance(string enemyEngunList){ List<string> daimyoEnguniList = new List<string> (); char[] delimiterChars = {':'}; char[] delimiterChars2 = {'-'}; if(enemyEngunList.Contains(":")){ daimyoEnguniList = new List<string> (enemyEngunList.Split (delimiterChars)); }else{ daimyoEnguniList.Add(enemyEngunList); } for(int i=0; i<daimyoEnguniList.Count; i++){ string daimyoEngunString = daimyoEnguniList[i]; List<string> unitEnguniList = new List<string> (); unitEnguniList = new List<string> (daimyoEngunString.Split (delimiterChars2)); int busyoId = int.Parse(unitEnguniList[0]); if(busyoId!=0){ int busyoLv = int.Parse(unitEnguniList[1]); int butaiQty = int.Parse(unitEnguniList[2]); int butaiLv = int.Parse(unitEnguniList[3]); StatusGet sts = new StatusGet (); int hp = sts.getHp (busyoId, busyoLv); int atk = sts.getAtk (busyoId, busyoLv); int dfc = sts.getDfc (busyoId, busyoLv); int spd = sts.getSpd (busyoId, busyoLv); string busyoName = sts.getBusyoName (busyoId); ArrayList senpouArray = sts.getSenpou (busyoId); //View Object & pass status to it. EnemyInstance inst = new EnemyInstance (); BusyoInfoGet info = new BusyoInfoGet (); string ch_type = info.getHeisyu (busyoId); int mapId = 22; inst.makeInstance(mapId, busyoId, butaiLv, ch_type, butaiQty, hp, atk, dfc, spd, busyoName, 0, false); } } Message msg = new Message (); string text = "敵軍の援軍が到着しましたぞ!"; msg.makeKassenMessage (text); }
public void playerEngunInstance(string playerEngunList){ List<string> daimyoEnguniList = new List<string> (); char[] delimiterChars = {':'}; char[] delimiterChars2 = {'-'}; if(playerEngunList.Contains(":")){ daimyoEnguniList = new List<string> (playerEngunList.Split (delimiterChars)); }else{ daimyoEnguniList.Add(playerEngunList); } for(int i=0; i<daimyoEnguniList.Count; i++){ string daimyoEngunString = daimyoEnguniList[i]; List<string> unitEnguniList = new List<string> (); unitEnguniList = new List<string> (daimyoEngunString.Split (delimiterChars2)); int busyoId = int.Parse(unitEnguniList[0]); if(busyoId!=0){ int busyoLv = int.Parse(unitEnguniList[1]); int butaiQty = int.Parse(unitEnguniList[2]); int butaiLv = int.Parse(unitEnguniList[3]); StatusGet sts = new StatusGet (); int hp = sts.getHp (busyoId, busyoLv); int atk = sts.getAtk (busyoId, busyoLv); int dfc = sts.getDfc (busyoId, busyoLv); int spd = sts.getSpd (busyoId, busyoLv); string busyoName = sts.getBusyoName (busyoId); ArrayList senpouArray = sts.getSenpou (busyoId); //View Object & pass status to it. PlayerInstance inst = new PlayerInstance (); inst.makeEngunInstance(busyoId, hp, atk, dfc, spd, senpouArray, busyoName, butaiQty, butaiLv); } } Message msg = new Message (); string text = "自軍の援軍が到着しましたぞ!"; msg.makeKassenMessage (text); }
public void getStsAndMakeInstance(int jinkei, int mapId){ String map = jinkei.ToString() + "map" + mapId; //Get Status int busyoId = PlayerPrefs.GetInt(map); string busyoString = busyoId.ToString(); int lv =PlayerPrefs.GetInt(busyoString); StatusGet sts = new StatusGet (); int hp = sts.getHp (busyoId, lv); int atk = sts.getAtk (busyoId, lv); int dfc = sts.getDfc (busyoId, lv); int spd = sts.getSpd (busyoId, lv); string busyoName = sts.getBusyoName (busyoId); ArrayList senpouArray = sts.getSenpou (busyoId); //View Object & pass status to it. PlayerInstance inst = new PlayerInstance (); inst.makeInstance (busyoId, mapId, hp, atk, dfc, spd, senpouArray, busyoName); }
public void OnClick() { AudioSource[] audioSources = GameObject.Find("SEController").GetComponents <AudioSource> (); if (name == "YesButton") { /*Tsuihou*/ //Limit Check int myBusyoQty = PlayerPrefs.GetInt("myBusyoQty"); if (myBusyoQty == 1) { //Error audioSources [4].Play(); Message msg = new Message(); msg.makeMessage(msg.getMessage(91)); } else { audioSources [4].Play(); //Delete Data //myBusyo List <string> myBusyo_list = new List <string> (); string myBusyoString = PlayerPrefs.GetString("myBusyo"); char[] delimiterChars = { ',' }; myBusyo_list.AddRange(myBusyoString.Split(delimiterChars)); myBusyo_list.Remove(busyoId.ToString()); string newMyBusyoString = ""; string newOnBusyo = myBusyo_list[0]; for (int i = 0; i < myBusyo_list.Count; i++) { newMyBusyoString = newMyBusyoString + myBusyo_list[i] + ","; } newMyBusyoString = newMyBusyoString.TrimEnd(','); //kahou List <string> kahou_list = new List <string> (); string kahou = "kahou" + busyoId; string kahouString = PlayerPrefs.GetString(kahou); kahou_list.AddRange(kahouString.Split(delimiterChars)); string availableBugu = PlayerPrefs.GetString("availableBugu"); string availableKabuto = PlayerPrefs.GetString("availableKabuto"); string availableGusoku = PlayerPrefs.GetString("availableGusoku"); string availableMeiba = PlayerPrefs.GetString("availableMeiba"); string availableCyadougu = PlayerPrefs.GetString("availableCyadougu"); string availableHeihousyo = PlayerPrefs.GetString("availableHeihousyo"); string availableChishikisyo = PlayerPrefs.GetString("availableChishikisyo"); for (int j = 0; j < kahou_list.Count; j++) { string kahouId = kahou_list[j]; if (j == 0) { //Bugu if (kahouId != "0") { if (availableBugu != "" && availableBugu != null) { availableBugu = availableBugu + "," + kahouId; } else { availableBugu = kahouId; } } } else if (j == 1) { //Kabuto if (kahouId != "0") { if (availableKabuto != "" && availableKabuto != null) { availableKabuto = availableKabuto + "," + kahouId; } else { availableKabuto = kahouId; } } } else if (j == 2) { //Gusoku if (kahouId != "0") { if (availableGusoku != "" && availableGusoku != null) { availableGusoku = availableGusoku + "," + kahouId; } else { availableGusoku = kahouId; } } } else if (j == 3) { //Meiba if (kahouId != "0") { if (availableMeiba != "" && availableMeiba != null) { availableMeiba = availableMeiba + "," + kahouId; } else { availableMeiba = kahouId; } } } else if (j == 4) { //Cyadougu1 if (kahouId != "0") { if (availableCyadougu != "" && availableCyadougu != null) { availableCyadougu = availableCyadougu + "," + kahouId; } else { availableCyadougu = kahouId; } } } else if (j == 5) { //Cyadougu2 if (kahouId != "0") { if (availableCyadougu != "" && availableCyadougu != null) { availableCyadougu = availableCyadougu + "," + kahouId; } else { availableCyadougu = kahouId; } } } else if (j == 6) { //Heihousyo if (kahouId != "0") { if (availableHeihousyo != "" && availableHeihousyo != null) { availableHeihousyo = availableHeihousyo + "," + kahouId; } else { availableHeihousyo = kahouId; } } } else if (j == 7) { //Chishikisyo if (kahouId != "0") { if (availableChishikisyo != "" && availableChishikisyo != null) { availableChishikisyo = availableChishikisyo + "," + kahouId; } else { availableChishikisyo = kahouId; } } } } //Kanni string kanniTmp = "kanni" + busyoId; if (PlayerPrefs.HasKey(kanniTmp)) { DoRemoveKanni removeKanni = new DoRemoveKanni(); removeKanni.removeKanni(busyoId.ToString()); } //Jyosyu for (int i = 1; i < 66; i++) { string jyosyuTemp = "jyosyu" + i.ToString(); int jyosyu = PlayerPrefs.GetInt(jyosyuTemp); if (jyosyu == busyoId) { PlayerPrefs.DeleteKey(jyosyuTemp); break; } } //OK PlayerPrefs.SetString("myBusyo", newMyBusyoString); PlayerPrefs.DeleteKey(busyoId.ToString()); string hei = "hei" + busyoId; PlayerPrefs.DeleteKey(hei); string senpou = "senpou" + busyoId; PlayerPrefs.DeleteKey(senpou); string saku = "saku" + busyoId; PlayerPrefs.DeleteKey(saku); string jyosyuHei = "jyosyuHei" + busyoId; PlayerPrefs.DeleteKey(jyosyuHei); string jyosyuBusyo = "jyosyuBusyo" + busyoId; PlayerPrefs.DeleteKey(jyosyuBusyo); if (availableBugu != null) { PlayerPrefs.SetString("availableBugu", availableBugu); } if (availableKabuto != null) { PlayerPrefs.SetString("availableKabuto", availableKabuto); } if (availableGusoku != null) { PlayerPrefs.SetString("availableGusoku", availableGusoku); } if (availableMeiba != null) { PlayerPrefs.SetString("availableMeiba", availableMeiba); } if (availableCyadougu != null) { PlayerPrefs.SetString("availableCyadougu", availableCyadougu); } if (availableHeihousyo != null) { PlayerPrefs.SetString("availableHeihousyo", availableHeihousyo); } if (availableChishikisyo != null) { PlayerPrefs.SetString("availableChishikisyo", availableChishikisyo); } PlayerPrefs.DeleteKey(kahou); string exp = "exp" + busyoId; PlayerPrefs.DeleteKey(exp); string gokui = "gokui" + busyoId; PlayerPrefs.DeleteKey(gokui); //jinkei 1map1 ~ 4map25 int oyaId = 1; for (int k = oyaId; k < 5; k++) { int koId = 1; for (int l = koId; l < 26; l++) { string mapKey = k.ToString() + "map" + l.ToString(); int mapBusyo = PlayerPrefs.GetInt(mapKey); if (mapBusyo == busyoId) { //Delete PlayerPrefs.DeleteKey(mapKey); } } } myBusyoQty = myBusyoQty - 1; PlayerPrefs.SetInt("myBusyoQty", myBusyoQty); PlayerPrefs.Flush(); //Back & Update Destroy(GameObject.Find("TsuihouConfirm")); Destroy(GameObject.Find("Back(Clone)")); MessageBusyo msg = new MessageBusyo(); string tsuihouText = ""; if (Application.systemLanguage != SystemLanguage.Japanese) { tsuihouText = "Banished " + busyoName + "."; } else { tsuihouText = busyoName + "を追放しました。"; } string type = "tsuihou"; msg.makeMessage(tsuihouText, busyoId, type); //Now On Busyo Mod. GameObject.Find("GameScene").GetComponent <NowOnBusyo>().OnBusyo = newOnBusyo; StatusGet sts = new StatusGet(); GameObject.Find("GameScene").GetComponent <NowOnBusyo>().OnBusyoName = sts.getBusyoName(int.Parse(newOnBusyo)); /*Initialization*/ //BusyoView RonkouScene ronkou = new RonkouScene(); SyoguScene syogu = new SyoguScene(); //Delete foreach (Transform n in GameObject.Find("BusyoView").transform) { //Busyo Serihu GameObject.Destroy(n.gameObject); } //Create ronkou.createBusyoView(newOnBusyo.ToString()); //BusyoStatus syogu.createSyoguView(newOnBusyo.ToString()); //Scroll View //Delete foreach (Transform n in GameObject.Find("Content").transform) { GameObject.Destroy(n.gameObject); } //Create List <string> myBusyoList = new List <string>(); GameObject mainController = GameObject.Find("GameScene"); string minBusyoId = ""; minBusyoId = ronkou.createScrollView(myBusyoList, minBusyoId, mainController, false); } } else if (name == "NoButton") { //Back audioSources [1].Play(); Destroy(GameObject.Find("TsuihouConfirm")); Destroy(GameObject.Find("Back(Clone)")); } }
//doramatic charactor // Use this for initialization void Start() { //map生成 Instantiate(mapPrefab); Instantiate(treePrefab); Instantiate(wallPrefab); /*プレイヤー配置*/ //ユーザ陣形データのロード int jinkei =PlayerPrefs.GetInt("jinkei",0); //1.魚麟 if (jinkei == 1) { if(PlayerPrefs.HasKey("1map1")){ int mapId = 1; String map = jinkei.ToString() + "map" + mapId; //Get Status int busyoInt = PlayerPrefs.GetInt(map); string busyoString = busyoInt.ToString(); int lv =PlayerPrefs.GetInt(busyoString); StatusGet sts = new StatusGet(); int hp = sts.getHp(busyoInt,lv); int atk = sts.getAtk(busyoInt,lv); int dfc = sts.getDfc(busyoInt,lv); int spd = sts.getSpd(busyoInt,lv); string busyoName = sts.getBusyoName(busyoInt); ArrayList senpouArray = sts.getSenpou(busyoInt); //View Object & pass status to it. PlayerInstance inst = new PlayerInstance(); inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName); } if(PlayerPrefs.HasKey("1map2")){ int mapId = 2; String map = jinkei.ToString() + "map" + mapId; //Get Status int busyoInt = PlayerPrefs.GetInt(map); string busyoString = busyoInt.ToString(); int lv =PlayerPrefs.GetInt(busyoString); StatusGet sts = new StatusGet(); int hp = sts.getHp(busyoInt,lv); int atk = sts.getAtk(busyoInt,lv); int dfc = sts.getDfc(busyoInt,lv); int spd = sts.getSpd(busyoInt,lv); string busyoName = sts.getBusyoName(busyoInt); ArrayList senpouArray = sts.getSenpou(busyoInt); //View Object & pass status to it. PlayerInstance inst = new PlayerInstance(); inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName); } if(PlayerPrefs.HasKey("1map7")){ int mapId = 7; String map = jinkei.ToString() + "map" + mapId; //Get Status int busyoInt = PlayerPrefs.GetInt(map); string busyoString = busyoInt.ToString(); int lv =PlayerPrefs.GetInt(busyoString); StatusGet sts = new StatusGet(); int hp = sts.getHp(busyoInt,lv); int atk = sts.getAtk(busyoInt,lv); int dfc = sts.getDfc(busyoInt,lv); int spd = sts.getSpd(busyoInt,lv); string busyoName = sts.getBusyoName(busyoInt); ArrayList senpouArray = sts.getSenpou(busyoInt); //View Object & pass status to it. PlayerInstance inst = new PlayerInstance(); inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName); } if(PlayerPrefs.HasKey("1map8")){ int mapId = 8; String map = jinkei.ToString() + "map" + mapId; //Get Status int busyoInt = PlayerPrefs.GetInt(map); string busyoString = busyoInt.ToString(); int lv =PlayerPrefs.GetInt(busyoString); StatusGet sts = new StatusGet(); int hp = sts.getHp(busyoInt,lv); int atk = sts.getAtk(busyoInt,lv); int dfc = sts.getDfc(busyoInt,lv); int spd = sts.getSpd(busyoInt,lv); string busyoName = sts.getBusyoName(busyoInt); ArrayList senpouArray = sts.getSenpou(busyoInt); //View Object & pass status to it. PlayerInstance inst = new PlayerInstance(); inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName); } if(PlayerPrefs.HasKey("1map11")){ int mapId = 11; String map = jinkei.ToString() + "map" + mapId; //Get Status int busyoInt = PlayerPrefs.GetInt(map); string busyoString = busyoInt.ToString(); int lv =PlayerPrefs.GetInt(busyoString); StatusGet sts = new StatusGet(); int hp = sts.getHp(busyoInt,lv); int atk = sts.getAtk(busyoInt,lv); int dfc = sts.getDfc(busyoInt,lv); int spd = sts.getSpd(busyoInt,lv); string busyoName = sts.getBusyoName(busyoInt); ArrayList senpouArray = sts.getSenpou(busyoInt); //View Object & pass status to it. PlayerInstance inst = new PlayerInstance(); inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName); } if(PlayerPrefs.HasKey("1map12")){ int mapId = 12; String map = jinkei.ToString() + "map" + mapId; //Get Status int busyoInt = PlayerPrefs.GetInt(map); string busyoString = busyoInt.ToString(); int lv =PlayerPrefs.GetInt(busyoString); StatusGet sts = new StatusGet(); int hp = sts.getHp(busyoInt,lv); int atk = sts.getAtk(busyoInt,lv); int dfc = sts.getDfc(busyoInt,lv); int spd = sts.getSpd(busyoInt,lv); string busyoName = sts.getBusyoName(busyoInt); ArrayList senpouArray = sts.getSenpou(busyoInt); //View Object & pass status to it. PlayerInstance inst = new PlayerInstance(); inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName); } if(PlayerPrefs.HasKey("1map13")){ int mapId = 13; String map = jinkei.ToString() + "map" + mapId; //Get Status int busyoInt = PlayerPrefs.GetInt(map); string busyoString = busyoInt.ToString(); int lv =PlayerPrefs.GetInt(busyoString); StatusGet sts = new StatusGet(); int hp = sts.getHp(busyoInt,lv); int atk = sts.getAtk(busyoInt,lv); int dfc = sts.getDfc(busyoInt,lv); int spd = sts.getSpd(busyoInt,lv); string busyoName = sts.getBusyoName(busyoInt); ArrayList senpouArray = sts.getSenpou(busyoInt); //View Object & pass status to it. PlayerInstance inst = new PlayerInstance(); inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName); } if(PlayerPrefs.HasKey("1map14")){ int mapId = 14; String map = jinkei.ToString() + "map" + mapId; //Get Status int busyoInt = PlayerPrefs.GetInt(map); string busyoString = busyoInt.ToString(); int lv =PlayerPrefs.GetInt(busyoString); StatusGet sts = new StatusGet(); int hp = sts.getHp(busyoInt,lv); int atk = sts.getAtk(busyoInt,lv); int dfc = sts.getDfc(busyoInt,lv); int spd = sts.getSpd(busyoInt,lv); string busyoName = sts.getBusyoName(busyoInt); ArrayList senpouArray = sts.getSenpou(busyoInt); //View Object & pass status to it. PlayerInstance inst = new PlayerInstance(); inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName); } if(PlayerPrefs.HasKey("1map17")){ int mapId = 17; String map = jinkei.ToString() + "map" + mapId; //Get Status int busyoInt = PlayerPrefs.GetInt(map); string busyoString = busyoInt.ToString(); int lv =PlayerPrefs.GetInt(busyoString); StatusGet sts = new StatusGet(); int hp = sts.getHp(busyoInt,lv); int atk = sts.getAtk(busyoInt,lv); int dfc = sts.getDfc(busyoInt,lv); int spd = sts.getSpd(busyoInt,lv); string busyoName = sts.getBusyoName(busyoInt); ArrayList senpouArray = sts.getSenpou(busyoInt); //View Object & pass status to it. PlayerInstance inst = new PlayerInstance(); inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName); } if(PlayerPrefs.HasKey("1map18")){ int mapId = 18; String map = jinkei.ToString() + "map" + mapId; //Get Status int busyoInt = PlayerPrefs.GetInt(map); string busyoString = busyoInt.ToString(); int lv =PlayerPrefs.GetInt(busyoString); StatusGet sts = new StatusGet(); int hp = sts.getHp(busyoInt,lv); int atk = sts.getAtk(busyoInt,lv); int dfc = sts.getDfc(busyoInt,lv); int spd = sts.getSpd(busyoInt,lv); string busyoName = sts.getBusyoName(busyoInt); ArrayList senpouArray = sts.getSenpou(busyoInt); //View Object & pass status to it. PlayerInstance inst = new PlayerInstance(); inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName); } if(PlayerPrefs.HasKey("1map21")){ int mapId = 21; String map = jinkei.ToString() + "map" + mapId; //Get Status int busyoInt = PlayerPrefs.GetInt(map); string busyoString = busyoInt.ToString(); int lv =PlayerPrefs.GetInt(busyoString); StatusGet sts = new StatusGet(); int hp = sts.getHp(busyoInt,lv); int atk = sts.getAtk(busyoInt,lv); int dfc = sts.getDfc(busyoInt,lv); int spd = sts.getSpd(busyoInt,lv); string busyoName = sts.getBusyoName(busyoInt); ArrayList senpouArray = sts.getSenpou(busyoInt); //View Object & pass status to it. PlayerInstance inst = new PlayerInstance(); inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName); } if(PlayerPrefs.HasKey("1map22")){ int mapId = 22; String map = jinkei.ToString() + "map" + mapId; //Get Status int busyoInt = PlayerPrefs.GetInt(map); string busyoString = busyoInt.ToString(); int lv =PlayerPrefs.GetInt(busyoString); StatusGet sts = new StatusGet(); int hp = sts.getHp(busyoInt,lv); int atk = sts.getAtk(busyoInt,lv); int dfc = sts.getDfc(busyoInt,lv); int spd = sts.getSpd(busyoInt,lv); string busyoName = sts.getBusyoName(busyoInt); ArrayList senpouArray = sts.getSenpou(busyoInt); //View Object & pass status to it. PlayerInstance inst = new PlayerInstance(); inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName); } //2.鶴翼 }else if(jinkei == 2){ if(PlayerPrefs.HasKey("2map3")){ int mapId = 3; String map = jinkei.ToString() + "map" + mapId; //Get Status int busyoInt = PlayerPrefs.GetInt(map); string busyoString = busyoInt.ToString(); int lv =PlayerPrefs.GetInt(busyoString); StatusGet sts = new StatusGet(); int hp = sts.getHp(busyoInt,lv); int atk = sts.getAtk(busyoInt,lv); int dfc = sts.getDfc(busyoInt,lv); int spd = sts.getSpd(busyoInt,lv); string busyoName = sts.getBusyoName(busyoInt); ArrayList senpouArray = sts.getSenpou(busyoInt); //View Object & pass status to it. PlayerInstance inst = new PlayerInstance(); inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName); } if(PlayerPrefs.HasKey("2map4")){ int mapId = 4; String map = jinkei.ToString() + "map" + mapId; //Get Status int busyoInt = PlayerPrefs.GetInt(map); string busyoString = busyoInt.ToString(); int lv =PlayerPrefs.GetInt(busyoString); StatusGet sts = new StatusGet(); int hp = sts.getHp(busyoInt,lv); int atk = sts.getAtk(busyoInt,lv); int dfc = sts.getDfc(busyoInt,lv); int spd = sts.getSpd(busyoInt,lv); string busyoName = sts.getBusyoName(busyoInt); ArrayList senpouArray = sts.getSenpou(busyoInt); //View Object & pass status to it. PlayerInstance inst = new PlayerInstance(); inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName); } if(PlayerPrefs.HasKey("2map5")){ int mapId = 5; String map = jinkei.ToString() + "map" + mapId; //Get Status int busyoInt = PlayerPrefs.GetInt(map); string busyoString = busyoInt.ToString(); int lv =PlayerPrefs.GetInt(busyoString); StatusGet sts = new StatusGet(); int hp = sts.getHp(busyoInt,lv); int atk = sts.getAtk(busyoInt,lv); int dfc = sts.getDfc(busyoInt,lv); int spd = sts.getSpd(busyoInt,lv); string busyoName = sts.getBusyoName(busyoInt); ArrayList senpouArray = sts.getSenpou(busyoInt); //View Object & pass status to it. PlayerInstance inst = new PlayerInstance(); inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName); } if(PlayerPrefs.HasKey("2map7")){ int mapId = 7; String map = jinkei.ToString() + "map" + mapId; //Get Status int busyoInt = PlayerPrefs.GetInt(map); string busyoString = busyoInt.ToString(); int lv =PlayerPrefs.GetInt(busyoString); StatusGet sts = new StatusGet(); int hp = sts.getHp(busyoInt,lv); int atk = sts.getAtk(busyoInt,lv); int dfc = sts.getDfc(busyoInt,lv); int spd = sts.getSpd(busyoInt,lv); string busyoName = sts.getBusyoName(busyoInt); ArrayList senpouArray = sts.getSenpou(busyoInt); //View Object & pass status to it. PlayerInstance inst = new PlayerInstance(); inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName); } if(PlayerPrefs.HasKey("2map8")){ int mapId = 8; String map = jinkei.ToString() + "map" + mapId; //Get Status int busyoInt = PlayerPrefs.GetInt(map); string busyoString = busyoInt.ToString(); int lv =PlayerPrefs.GetInt(busyoString); StatusGet sts = new StatusGet(); int hp = sts.getHp(busyoInt,lv); int atk = sts.getAtk(busyoInt,lv); int dfc = sts.getDfc(busyoInt,lv); int spd = sts.getSpd(busyoInt,lv); string busyoName = sts.getBusyoName(busyoInt); ArrayList senpouArray = sts.getSenpou(busyoInt); //View Object & pass status to it. PlayerInstance inst = new PlayerInstance(); inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName); } if(PlayerPrefs.HasKey("2map11")){ int mapId = 11; String map = jinkei.ToString() + "map" + mapId; //Get Status int busyoInt = PlayerPrefs.GetInt(map); string busyoString = busyoInt.ToString(); int lv =PlayerPrefs.GetInt(busyoString); StatusGet sts = new StatusGet(); int hp = sts.getHp(busyoInt,lv); int atk = sts.getAtk(busyoInt,lv); int dfc = sts.getDfc(busyoInt,lv); int spd = sts.getSpd(busyoInt,lv); string busyoName = sts.getBusyoName(busyoInt); ArrayList senpouArray = sts.getSenpou(busyoInt); //View Object & pass status to it. PlayerInstance inst = new PlayerInstance(); inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName); } if(PlayerPrefs.HasKey("2map12")){ int mapId = 12; String map = jinkei.ToString() + "map" + mapId; //Get Status int busyoInt = PlayerPrefs.GetInt(map); string busyoString = busyoInt.ToString(); int lv =PlayerPrefs.GetInt(busyoString); StatusGet sts = new StatusGet(); int hp = sts.getHp(busyoInt,lv); int atk = sts.getAtk(busyoInt,lv); int dfc = sts.getDfc(busyoInt,lv); int spd = sts.getSpd(busyoInt,lv); string busyoName = sts.getBusyoName(busyoInt); ArrayList senpouArray = sts.getSenpou(busyoInt); //View Object & pass status to it. PlayerInstance inst = new PlayerInstance(); inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName); } if(PlayerPrefs.HasKey("2map17")){ int mapId = 17; String map = jinkei.ToString() + "map" + mapId; //Get Status int busyoInt = PlayerPrefs.GetInt(map); string busyoString = busyoInt.ToString(); int lv =PlayerPrefs.GetInt(busyoString); StatusGet sts = new StatusGet(); int hp = sts.getHp(busyoInt,lv); int atk = sts.getAtk(busyoInt,lv); int dfc = sts.getDfc(busyoInt,lv); int spd = sts.getSpd(busyoInt,lv); string busyoName = sts.getBusyoName(busyoInt); ArrayList senpouArray = sts.getSenpou(busyoInt); //View Object & pass status to it. PlayerInstance inst = new PlayerInstance(); inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName); } if(PlayerPrefs.HasKey("2map18")){ int mapId = 18; String map = jinkei.ToString() + "map" + mapId; //Get Status int busyoInt = PlayerPrefs.GetInt(map); string busyoString = busyoInt.ToString(); int lv =PlayerPrefs.GetInt(busyoString); StatusGet sts = new StatusGet(); int hp = sts.getHp(busyoInt,lv); int atk = sts.getAtk(busyoInt,lv); int dfc = sts.getDfc(busyoInt,lv); int spd = sts.getSpd(busyoInt,lv); string busyoName = sts.getBusyoName(busyoInt); ArrayList senpouArray = sts.getSenpou(busyoInt); //View Object & pass status to it. PlayerInstance inst = new PlayerInstance(); inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName); } if(PlayerPrefs.HasKey("2map23")){ int mapId = 23; String map = jinkei.ToString() + "map" + mapId; //Get Status int busyoInt = PlayerPrefs.GetInt(map); string busyoString = busyoInt.ToString(); int lv =PlayerPrefs.GetInt(busyoString); StatusGet sts = new StatusGet(); int hp = sts.getHp(busyoInt,lv); int atk = sts.getAtk(busyoInt,lv); int dfc = sts.getDfc(busyoInt,lv); int spd = sts.getSpd(busyoInt,lv); string busyoName = sts.getBusyoName(busyoInt); ArrayList senpouArray = sts.getSenpou(busyoInt); //View Object & pass status to it. PlayerInstance inst = new PlayerInstance(); inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName); } if(PlayerPrefs.HasKey("2map24")){ int mapId = 24; String map = jinkei.ToString() + "map" + mapId; //Get Status int busyoInt = PlayerPrefs.GetInt(map); string busyoString = busyoInt.ToString(); int lv =PlayerPrefs.GetInt(busyoString); StatusGet sts = new StatusGet(); int hp = sts.getHp(busyoInt,lv); int atk = sts.getAtk(busyoInt,lv); int dfc = sts.getDfc(busyoInt,lv); int spd = sts.getSpd(busyoInt,lv); string busyoName = sts.getBusyoName(busyoInt); ArrayList senpouArray = sts.getSenpou(busyoInt); //View Object & pass status to it. PlayerInstance inst = new PlayerInstance(); inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName); } if(PlayerPrefs.HasKey("2map25")){ int mapId = 25; String map = jinkei.ToString() + "map" + mapId; //Get Status int busyoInt = PlayerPrefs.GetInt(map); string busyoString = busyoInt.ToString(); int lv =PlayerPrefs.GetInt(busyoString); StatusGet sts = new StatusGet(); int hp = sts.getHp(busyoInt,lv); int atk = sts.getAtk(busyoInt,lv); int dfc = sts.getDfc(busyoInt,lv); int spd = sts.getSpd(busyoInt,lv); string busyoName = sts.getBusyoName(busyoInt); ArrayList senpouArray = sts.getSenpou(busyoInt); //View Object & pass status to it. PlayerInstance inst = new PlayerInstance(); inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName); } } //3.偃月 else if(jinkei == 3){ if(PlayerPrefs.HasKey("3map3")){ int mapId = 3; String map = jinkei.ToString() + "map" + mapId; //Get Status int busyoInt = PlayerPrefs.GetInt(map); string busyoString = busyoInt.ToString(); int lv =PlayerPrefs.GetInt(busyoString); StatusGet sts = new StatusGet(); int hp = sts.getHp(busyoInt,lv); int atk = sts.getAtk(busyoInt,lv); int dfc = sts.getDfc(busyoInt,lv); int spd = sts.getSpd(busyoInt,lv); string busyoName = sts.getBusyoName(busyoInt); ArrayList senpouArray = sts.getSenpou(busyoInt); //View Object & pass status to it. PlayerInstance inst = new PlayerInstance(); inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName); } if(PlayerPrefs.HasKey("3map7")){ int mapId = 7; String map = jinkei.ToString() + "map" + mapId; //Get Status int busyoInt = PlayerPrefs.GetInt(map); string busyoString = busyoInt.ToString(); int lv =PlayerPrefs.GetInt(busyoString); StatusGet sts = new StatusGet(); int hp = sts.getHp(busyoInt,lv); int atk = sts.getAtk(busyoInt,lv); int dfc = sts.getDfc(busyoInt,lv); int spd = sts.getSpd(busyoInt,lv); string busyoName = sts.getBusyoName(busyoInt); ArrayList senpouArray = sts.getSenpou(busyoInt); //View Object & pass status to it. PlayerInstance inst = new PlayerInstance(); inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName); } if(PlayerPrefs.HasKey("3map8")){ int mapId = 8; String map = jinkei.ToString() + "map" + mapId; //Get Status int busyoInt = PlayerPrefs.GetInt(map); string busyoString = busyoInt.ToString(); int lv =PlayerPrefs.GetInt(busyoString); StatusGet sts = new StatusGet(); int hp = sts.getHp(busyoInt,lv); int atk = sts.getAtk(busyoInt,lv); int dfc = sts.getDfc(busyoInt,lv); int spd = sts.getSpd(busyoInt,lv); string busyoName = sts.getBusyoName(busyoInt); ArrayList senpouArray = sts.getSenpou(busyoInt); //View Object & pass status to it. PlayerInstance inst = new PlayerInstance(); inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName); } if(PlayerPrefs.HasKey("3map9")){ int mapId = 9; String map = jinkei.ToString() + "map" + mapId; //Get Status int busyoInt = PlayerPrefs.GetInt(map); string busyoString = busyoInt.ToString(); int lv =PlayerPrefs.GetInt(busyoString); StatusGet sts = new StatusGet(); int hp = sts.getHp(busyoInt,lv); int atk = sts.getAtk(busyoInt,lv); int dfc = sts.getDfc(busyoInt,lv); int spd = sts.getSpd(busyoInt,lv); string busyoName = sts.getBusyoName(busyoInt); ArrayList senpouArray = sts.getSenpou(busyoInt); //View Object & pass status to it. PlayerInstance inst = new PlayerInstance(); inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName); } if(PlayerPrefs.HasKey("3map11")){ int mapId = 11; String map = jinkei.ToString() + "map" + mapId; //Get Status int busyoInt = PlayerPrefs.GetInt(map); string busyoString = busyoInt.ToString(); int lv =PlayerPrefs.GetInt(busyoString); StatusGet sts = new StatusGet(); int hp = sts.getHp(busyoInt,lv); int atk = sts.getAtk(busyoInt,lv); int dfc = sts.getDfc(busyoInt,lv); int spd = sts.getSpd(busyoInt,lv); string busyoName = sts.getBusyoName(busyoInt); ArrayList senpouArray = sts.getSenpou(busyoInt); //View Object & pass status to it. PlayerInstance inst = new PlayerInstance(); inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName); } if(PlayerPrefs.HasKey("3map12")){ int mapId = 12; String map = jinkei.ToString() + "map" + mapId; //Get Status int busyoInt = PlayerPrefs.GetInt(map); string busyoString = busyoInt.ToString(); int lv =PlayerPrefs.GetInt(busyoString); StatusGet sts = new StatusGet(); int hp = sts.getHp(busyoInt,lv); int atk = sts.getAtk(busyoInt,lv); int dfc = sts.getDfc(busyoInt,lv); int spd = sts.getSpd(busyoInt,lv); string busyoName = sts.getBusyoName(busyoInt); ArrayList senpouArray = sts.getSenpou(busyoInt); //View Object & pass status to it. PlayerInstance inst = new PlayerInstance(); inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName); } if(PlayerPrefs.HasKey("3map14")){ int mapId = 14; String map = jinkei.ToString() + "map" + mapId; //Get Status int busyoInt = PlayerPrefs.GetInt(map); string busyoString = busyoInt.ToString(); int lv =PlayerPrefs.GetInt(busyoString); StatusGet sts = new StatusGet(); int hp = sts.getHp(busyoInt,lv); int atk = sts.getAtk(busyoInt,lv); int dfc = sts.getDfc(busyoInt,lv); int spd = sts.getSpd(busyoInt,lv); string busyoName = sts.getBusyoName(busyoInt); ArrayList senpouArray = sts.getSenpou(busyoInt); //View Object & pass status to it. PlayerInstance inst = new PlayerInstance(); inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName); } if(PlayerPrefs.HasKey("3map15")){ int mapId = 15; String map = jinkei.ToString() + "map" + mapId; //Get Status int busyoInt = PlayerPrefs.GetInt(map); string busyoString = busyoInt.ToString(); int lv =PlayerPrefs.GetInt(busyoString); StatusGet sts = new StatusGet(); int hp = sts.getHp(busyoInt,lv); int atk = sts.getAtk(busyoInt,lv); int dfc = sts.getDfc(busyoInt,lv); int spd = sts.getSpd(busyoInt,lv); string busyoName = sts.getBusyoName(busyoInt); ArrayList senpouArray = sts.getSenpou(busyoInt); //View Object & pass status to it. PlayerInstance inst = new PlayerInstance(); inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName); } if(PlayerPrefs.HasKey("3map16")){ int mapId = 16; String map = jinkei.ToString() + "map" + mapId; //Get Status int busyoInt = PlayerPrefs.GetInt(map); string busyoString = busyoInt.ToString(); int lv =PlayerPrefs.GetInt(busyoString); StatusGet sts = new StatusGet(); int hp = sts.getHp(busyoInt,lv); int atk = sts.getAtk(busyoInt,lv); int dfc = sts.getDfc(busyoInt,lv); int spd = sts.getSpd(busyoInt,lv); string busyoName = sts.getBusyoName(busyoInt); ArrayList senpouArray = sts.getSenpou(busyoInt); //View Object & pass status to it. PlayerInstance inst = new PlayerInstance(); inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName); } if(PlayerPrefs.HasKey("3map20")){ int mapId = 20; String map = jinkei.ToString() + "map" + mapId; //Get Status int busyoInt = PlayerPrefs.GetInt(map); string busyoString = busyoInt.ToString(); int lv =PlayerPrefs.GetInt(busyoString); StatusGet sts = new StatusGet(); int hp = sts.getHp(busyoInt,lv); int atk = sts.getAtk(busyoInt,lv); int dfc = sts.getDfc(busyoInt,lv); int spd = sts.getSpd(busyoInt,lv); string busyoName = sts.getBusyoName(busyoInt); ArrayList senpouArray = sts.getSenpou(busyoInt); //View Object & pass status to it. PlayerInstance inst = new PlayerInstance(); inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName); } if(PlayerPrefs.HasKey("3map21")){ int mapId = 21; String map = jinkei.ToString() + "map" + mapId; //Get Status int busyoInt = PlayerPrefs.GetInt(map); string busyoString = busyoInt.ToString(); int lv =PlayerPrefs.GetInt(busyoString); StatusGet sts = new StatusGet(); int hp = sts.getHp(busyoInt,lv); int atk = sts.getAtk(busyoInt,lv); int dfc = sts.getDfc(busyoInt,lv); int spd = sts.getSpd(busyoInt,lv); string busyoName = sts.getBusyoName(busyoInt); ArrayList senpouArray = sts.getSenpou(busyoInt); //View Object & pass status to it. PlayerInstance inst = new PlayerInstance(); inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName); } if(PlayerPrefs.HasKey("3map25")){ int mapId = 25; String map = jinkei.ToString() + "map" + mapId; //Get Status int busyoInt = PlayerPrefs.GetInt(map); string busyoString = busyoInt.ToString(); int lv =PlayerPrefs.GetInt(busyoString); StatusGet sts = new StatusGet(); int hp = sts.getHp(busyoInt,lv); int atk = sts.getAtk(busyoInt,lv); int dfc = sts.getDfc(busyoInt,lv); int spd = sts.getSpd(busyoInt,lv); string busyoName = sts.getBusyoName(busyoInt); ArrayList senpouArray = sts.getSenpou(busyoInt); //View Object & pass status to it. PlayerInstance inst = new PlayerInstance(); inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName); } } //4.雁行 else if(jinkei == 4){ if(PlayerPrefs.HasKey("4map1")){ int mapId = 1; String map = jinkei.ToString() + "map" + mapId; //Get Status int busyoInt = PlayerPrefs.GetInt(map); string busyoString = busyoInt.ToString(); int lv =PlayerPrefs.GetInt(busyoString); StatusGet sts = new StatusGet(); int hp = sts.getHp(busyoInt,lv); int atk = sts.getAtk(busyoInt,lv); int dfc = sts.getDfc(busyoInt,lv); int spd = sts.getSpd(busyoInt,lv); string busyoName = sts.getBusyoName(busyoInt); ArrayList senpouArray = sts.getSenpou(busyoInt); //View Object & pass status to it. PlayerInstance inst = new PlayerInstance(); inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName); } if(PlayerPrefs.HasKey("4map2")){ int mapId = 2; String map = jinkei.ToString() + "map" + mapId; //Get Status int busyoInt = PlayerPrefs.GetInt(map); string busyoString = busyoInt.ToString(); int lv =PlayerPrefs.GetInt(busyoString); StatusGet sts = new StatusGet(); int hp = sts.getHp(busyoInt,lv); int atk = sts.getAtk(busyoInt,lv); int dfc = sts.getDfc(busyoInt,lv); int spd = sts.getSpd(busyoInt,lv); string busyoName = sts.getBusyoName(busyoInt); ArrayList senpouArray = sts.getSenpou(busyoInt); //View Object & pass status to it. PlayerInstance inst = new PlayerInstance(); inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName); } if(PlayerPrefs.HasKey("4map7")){ int mapId = 7; String map = jinkei.ToString() + "map" + mapId; //Get Status int busyoInt = PlayerPrefs.GetInt(map); string busyoString = busyoInt.ToString(); int lv =PlayerPrefs.GetInt(busyoString); StatusGet sts = new StatusGet(); int hp = sts.getHp(busyoInt,lv); int atk = sts.getAtk(busyoInt,lv); int dfc = sts.getDfc(busyoInt,lv); int spd = sts.getSpd(busyoInt,lv); string busyoName = sts.getBusyoName(busyoInt); ArrayList senpouArray = sts.getSenpou(busyoInt); //View Object & pass status to it. PlayerInstance inst = new PlayerInstance(); inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName); } if(PlayerPrefs.HasKey("4map8")){ int mapId = 8; String map = jinkei.ToString() + "map" + mapId; //Get Status int busyoInt = PlayerPrefs.GetInt(map); string busyoString = busyoInt.ToString(); int lv =PlayerPrefs.GetInt(busyoString); StatusGet sts = new StatusGet(); int hp = sts.getHp(busyoInt,lv); int atk = sts.getAtk(busyoInt,lv); int dfc = sts.getDfc(busyoInt,lv); int spd = sts.getSpd(busyoInt,lv); string busyoName = sts.getBusyoName(busyoInt); ArrayList senpouArray = sts.getSenpou(busyoInt); //View Object & pass status to it. PlayerInstance inst = new PlayerInstance(); inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName); } if(PlayerPrefs.HasKey("4map12")){ int mapId = 12; String map = jinkei.ToString() + "map" + mapId; //Get Status int busyoInt = PlayerPrefs.GetInt(map); string busyoString = busyoInt.ToString(); int lv =PlayerPrefs.GetInt(busyoString); StatusGet sts = new StatusGet(); int hp = sts.getHp(busyoInt,lv); int atk = sts.getAtk(busyoInt,lv); int dfc = sts.getDfc(busyoInt,lv); int spd = sts.getSpd(busyoInt,lv); string busyoName = sts.getBusyoName(busyoInt); ArrayList senpouArray = sts.getSenpou(busyoInt); //View Object & pass status to it. PlayerInstance inst = new PlayerInstance(); inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName); } if(PlayerPrefs.HasKey("4map13")){ int mapId = 13; String map = jinkei.ToString() + "map" + mapId; //Get Status int busyoInt = PlayerPrefs.GetInt(map); string busyoString = busyoInt.ToString(); int lv =PlayerPrefs.GetInt(busyoString); StatusGet sts = new StatusGet(); int hp = sts.getHp(busyoInt,lv); int atk = sts.getAtk(busyoInt,lv); int dfc = sts.getDfc(busyoInt,lv); int spd = sts.getSpd(busyoInt,lv); string busyoName = sts.getBusyoName(busyoInt); ArrayList senpouArray = sts.getSenpou(busyoInt); //View Object & pass status to it. PlayerInstance inst = new PlayerInstance(); inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName); } if(PlayerPrefs.HasKey("4map14")){ int mapId = 14; String map = jinkei.ToString() + "map" + mapId; //Get Status int busyoInt = PlayerPrefs.GetInt(map); string busyoString = busyoInt.ToString(); int lv =PlayerPrefs.GetInt(busyoString); StatusGet sts = new StatusGet(); int hp = sts.getHp(busyoInt,lv); int atk = sts.getAtk(busyoInt,lv); int dfc = sts.getDfc(busyoInt,lv); int spd = sts.getSpd(busyoInt,lv); string busyoName = sts.getBusyoName(busyoInt); ArrayList senpouArray = sts.getSenpou(busyoInt); //View Object & pass status to it. PlayerInstance inst = new PlayerInstance(); inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName); } if(PlayerPrefs.HasKey("4map18")){ int mapId = 18; String map = jinkei.ToString() + "map" + mapId; //Get Status int busyoInt = PlayerPrefs.GetInt(map); string busyoString = busyoInt.ToString(); int lv =PlayerPrefs.GetInt(busyoString); StatusGet sts = new StatusGet(); int hp = sts.getHp(busyoInt,lv); int atk = sts.getAtk(busyoInt,lv); int dfc = sts.getDfc(busyoInt,lv); int spd = sts.getSpd(busyoInt,lv); string busyoName = sts.getBusyoName(busyoInt); ArrayList senpouArray = sts.getSenpou(busyoInt); //View Object & pass status to it. PlayerInstance inst = new PlayerInstance(); inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName); } if(PlayerPrefs.HasKey("4map19")){ int mapId = 19; String map = jinkei.ToString() + "map" + mapId; //Get Status int busyoInt = PlayerPrefs.GetInt(map); string busyoString = busyoInt.ToString(); int lv =PlayerPrefs.GetInt(busyoString); StatusGet sts = new StatusGet(); int hp = sts.getHp(busyoInt,lv); int atk = sts.getAtk(busyoInt,lv); int dfc = sts.getDfc(busyoInt,lv); int spd = sts.getSpd(busyoInt,lv); string busyoName = sts.getBusyoName(busyoInt); ArrayList senpouArray = sts.getSenpou(busyoInt); //View Object & pass status to it. PlayerInstance inst = new PlayerInstance(); inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName); } if(PlayerPrefs.HasKey("4map20")){ int mapId = 20; String map = jinkei.ToString() + "map" + mapId; //Get Status int busyoInt = PlayerPrefs.GetInt(map); string busyoString = busyoInt.ToString(); int lv =PlayerPrefs.GetInt(busyoString); StatusGet sts = new StatusGet(); int hp = sts.getHp(busyoInt,lv); int atk = sts.getAtk(busyoInt,lv); int dfc = sts.getDfc(busyoInt,lv); int spd = sts.getSpd(busyoInt,lv); string busyoName = sts.getBusyoName(busyoInt); ArrayList senpouArray = sts.getSenpou(busyoInt); //View Object & pass status to it. PlayerInstance inst = new PlayerInstance(); inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName); } if(PlayerPrefs.HasKey("4map24")){ int mapId = 24; String map = jinkei.ToString() + "map" + mapId; //Get Status int busyoInt = PlayerPrefs.GetInt(map); string busyoString = busyoInt.ToString(); int lv =PlayerPrefs.GetInt(busyoString); StatusGet sts = new StatusGet(); int hp = sts.getHp(busyoInt,lv); int atk = sts.getAtk(busyoInt,lv); int dfc = sts.getDfc(busyoInt,lv); int spd = sts.getSpd(busyoInt,lv); string busyoName = sts.getBusyoName(busyoInt); ArrayList senpouArray = sts.getSenpou(busyoInt); //View Object & pass status to it. PlayerInstance inst = new PlayerInstance(); inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName); } if(PlayerPrefs.HasKey("4map25")){ int mapId = 25; String map = jinkei.ToString() + "map" + mapId; //Get Status int busyoInt = PlayerPrefs.GetInt(map); string busyoString = busyoInt.ToString(); int lv =PlayerPrefs.GetInt(busyoString); StatusGet sts = new StatusGet(); int hp = sts.getHp(busyoInt,lv); int atk = sts.getAtk(busyoInt,lv); int dfc = sts.getDfc(busyoInt,lv); int spd = sts.getSpd(busyoInt,lv); string busyoName = sts.getBusyoName(busyoInt); ArrayList senpouArray = sts.getSenpou(busyoInt); //View Object & pass status to it. PlayerInstance inst = new PlayerInstance(); inst.makeInstance(busyoInt, mapId, hp, atk, dfc, spd, senpouArray, busyoName); } } /*エネミー配置*/ //stageId取得しマスタ判別 int tempStageId = PlayerPrefs.GetInt("activeStageId",0); int kuniId = PlayerPrefs.GetInt("activeKuniId",0); Entity_stage_mst stageMst = Resources.Load ("Data/stage_mst") as Entity_stage_mst; //y=10(X-1)+z-1 int stageId = 10*(kuniId - 1) + tempStageId; int enemyJinkei = stageMst.param[stageId - 1].jinkei; int enemyLv = stageMst.param[stageId - 1].lv; int[] enemyArray = new int[25]; enemyArray[0] = stageMst.param[stageId - 1].map1; enemyArray[1] = stageMst.param[stageId - 1].map2; enemyArray[2] = stageMst.param[stageId - 1].map3; enemyArray[3] = stageMst.param[stageId - 1].map4; enemyArray[4] = stageMst.param[stageId - 1].map5; enemyArray[5] = stageMst.param[stageId - 1].map6; enemyArray[6] = stageMst.param[stageId - 1].map7; enemyArray[7] = stageMst.param[stageId - 1].map8; enemyArray[8] = stageMst.param[stageId - 1].map9; enemyArray[9] = stageMst.param[stageId - 1].map10; enemyArray[10] = stageMst.param[stageId - 1].map11; enemyArray[11] = stageMst.param[stageId - 1].map12; enemyArray[12] = stageMst.param[stageId - 1].map13; enemyArray[13] = stageMst.param[stageId - 1].map14; enemyArray[14] = stageMst.param[stageId - 1].map15; enemyArray[15] = stageMst.param[stageId - 1].map16; enemyArray[16] = stageMst.param[stageId - 1].map17; enemyArray[17] = stageMst.param[stageId - 1].map18; enemyArray[18] = stageMst.param[stageId - 1].map19; enemyArray[19] = stageMst.param[stageId - 1].map20; enemyArray[20] = stageMst.param[stageId - 1].map21; enemyArray[21] = stageMst.param[stageId - 1].map22; enemyArray[22] = stageMst.param[stageId - 1].map23; enemyArray[23] = stageMst.param[stageId - 1].map24; enemyArray[24] = stageMst.param[stageId - 1].map25; int ch_num = stageMst.param[stageId - 1].chQty; int ch_lv = stageMst.param[stageId - 1].lv; for(int i=0; i < enemyArray.Length; i++ ){ if(enemyArray[i] != 0){ int enemyMapId = i+1; int EnemyMap = enemyArray[i]; StatusGet sts = new StatusGet(); int hp = sts.getHp(EnemyMap,enemyLv); int atk = sts.getAtk(EnemyMap,enemyLv); int dfc = sts.getDfc(EnemyMap,enemyLv); int spd = sts.getSpd(EnemyMap,enemyLv); BusyoInfoGet info = new BusyoInfoGet(); String busyoName = info.getName(EnemyMap); String ch_type = info.getHeisyu(EnemyMap); EnemyInstance inst = new EnemyInstance(); inst.makeInstance(enemyMapId, EnemyMap, ch_lv, ch_type, ch_num, hp, atk, dfc, spd, busyoName); } } //HP bar //Instantiate(hpBarPlayerPrefab); //Instantiate(hpBarEnemyPrefab); //合戦開始エフェクト string pathBack = "Prefabs/PreKassen/backGround"; GameObject back = Instantiate(Resources.Load (pathBack)) as GameObject; back.transform.localScale = new Vector2 (30, 15); string pathLight = "Prefabs/PreKassen/lightning"; GameObject light = Instantiate(Resources.Load (pathLight)) as GameObject; light.transform.localScale = new Vector2 (10, 10); }