public void ExchangeText() { if (localizationKey == "" || localizationKey == null) { Debug.LogError(textAsset.text); return; } if (localizationValue == null) { textAsset.text = MyLocalization.Exchange(localizationKey); } else { switch (localizationValue.Length) { case 0: textAsset.text = MyLocalization.Exchange(localizationKey); break; case 1: textAsset.text = MyLocalization.Exchange(localizationKey, localizationValue[0]); break; case 2: textAsset.text = MyLocalization.Exchange(localizationKey, localizationValue[0], localizationValue[1]); break; default: Debug.LogError("Too many Value"); break; } } }
private void item_Text(int i) { for (int j = 0; j < 4; j++) { if (Store_Dic[Store_Key[i]].Value_List[j] != "") { information_List[j].gameObject.SetActive(true); //information_List[j].transform.GetComponent<Text>().text = Store_Dic[Store_Key[i]].Value_List[j]; if (Store_Dic[Store_Key[i]].Item_List[j] == Store_Information.ItemType.car || Store_Dic[Store_Key[i]].Item_List[j] == Store_Information.ItemType.removead) { information_List[j].transform.GetComponent <Text>().text = MyLocalization.Exchange(Store_Dic[Store_Key[i]].Value_List[j]); } else { information_List[j].transform.GetComponent <Text>().text = MyLocalization.Exchange(string.Format("{0}_", Store_Dic[Store_Key[i]].Item_List[j].ToString()), Store_Dic[Store_Key[i]].Value_List[j]); } } else { information_List[j].gameObject.SetActive(false); information_List[j].transform.GetComponent <Text>().text = ""; } } select_Item.transform.GetChild(3).gameObject.SetActive(true); }
private void StatSliderAndText(int i) { Topspeed.maxValue = car_stat[Key[i]].TopSpeed + (car_stat[Key[i]].Tsc * 10); Acceleration.maxValue = car_stat[Key[i]].Acceleration + (car_stat[Key[i]].Acc * 10); Cornering.maxValue = car_stat[Key[i]].Cornering + (car_stat[Key[i]].Coc * 10); Brake.maxValue = car_stat[Key[i]].Brake + (car_stat[Key[i]].Brc * 10); Topspeed.value = car_stat[Key[i]].TotalTS; Acceleration.value = car_stat[Key[i]].TotalAC; Cornering.value = car_stat[Key[i]].TotalCO; Brake.value = car_stat[Key[i]].TotalBR; Carname_Text.text = MyLocalization.Exchange(car_stat[Key[i]].CarName); if (car_stat[Key[i]].Information.IsPurchased) { Topspeed_Text.text = string.Format(Purchased, MyLocalization.Exchange("topspeed"), Topspeed.value, car_stat[Key[i]].Tsc); Acceleration_Text.text = string.Format(Purchased, MyLocalization.Exchange("acceleration"), Acceleration.value, car_stat[Key[i]].Acc); Cornering_Text.text = string.Format(Purchased, MyLocalization.Exchange("cornering"), Cornering.value, car_stat[Key[i]].Coc); Break_Text.text = string.Format(Purchased, MyLocalization.Exchange("braking"), Brake.value, car_stat[Key[i]].Brc); } else { Topspeed_Text.text = string.Format(notPurchased, MyLocalization.Exchange("topspeed"), Topspeed.value); Acceleration_Text.text = string.Format(notPurchased, MyLocalization.Exchange("acceleration"), Acceleration.value); Cornering_Text.text = string.Format(notPurchased, MyLocalization.Exchange("cornering"), Cornering.value); Break_Text.text = string.Format(notPurchased, MyLocalization.Exchange("braking"), Brake.value); } }
public void PrintListSkillEffect() { Console.WriteLine("\n" + Ultils.FormatText(MyLocalization.GetText("ID"), 10) + Ultils.FormatText(MyLocalization.GetText("Type Action"), 30) + Ultils.FormatText(MyLocalization.GetText("Type Effect"), 30) + Ultils.FormatText(MyLocalization.GetText("Level Skill Effect")) + Ultils.FormatText(MyLocalization.GetText("Effect Value")) + Ultils.FormatText(MyLocalization.GetText("Time Exist")) + Ultils.FormatText(MyLocalization.GetText("Ratio Success")) + Ultils.FormatText(MyLocalization.GetText("Time Distance")) + Ultils.FormatText(MyLocalization.GetText("Ratio Outbreak")) + "\n"); foreach (var item in skillEffectManager.GetListSkillEffect()) { PrintSkillEffect(item.Value); } }
public void PrintListSkill() { Console.WriteLine(Ultils.FormatText(MyLocalization.GetText("ID"), 10) + Ultils.FormatText(MyLocalization.GetText("Skill Name"), 25) + Ultils.FormatText(MyLocalization.GetText("Description"), 20) + Ultils.FormatText(MyLocalization.GetText("Magic Value")) + Ultils.FormatText(MyLocalization.GetText("Time Cool Down")) + Ultils.FormatText(MyLocalization.GetText("MP Used"), 10) + "\n"); foreach (var item in skillManager.GetList()) { PrintSkill(item.Value); } }
public void PrintListCharacter() { Console.WriteLine("List of Characters"); Console.WriteLine(Ultils.FormatText(MyLocalization.GetText("ID"), 10) + Ultils.FormatText(MyLocalization.GetText("Character's name"), 50)); foreach (var character in characterManager.GetList()) { PrintCharacter(character.Value); } }
//public void Initialized() // 게임시작할때 한번 //{ // car_list = new List<Car_Information>(); // for (int i = 0; i < DesignConstStorage.carData.Rows.Count; i++) // { // make_car.Initialize(this, DesignConstStorage.carData.Rows[i]); // car_list.Add(make_car); // } //} private void Car_Image_Text(int i) { Car1_Image.sprite = Resources.Load <Sprite>(string.Format(path, car_stat[Key[i]].CarName)); Car2_Image.sprite = Resources.Load <Sprite>(string.Format(path, car_stat[Key[i + 1]].CarName)); Car3_Image.sprite = Resources.Load <Sprite>(string.Format(path, car_stat[Key[i + 2]].CarName)); Car1_T.text = MyLocalization.Exchange(car_stat[Key[i]].CarName); Car2_T.text = MyLocalization.Exchange(car_stat[Key[i + 1]].CarName); Car3_T.text = MyLocalization.Exchange(car_stat[Key[i + 2]].CarName); Car_Page_T.text = ((i / 3) + 1) + " / " + page; }
public void UpdateHPAndMP(CharacterBattleData player1, CharacterBattleData player2) { lock (syncLock) { Console.SetCursorPosition(7, 5); Console.Write(Ultils.FormatText(MyLocalization.GetText("HP: "), 10) + player1.hp + "\t" + Ultils.FormatText(MyLocalization.GetText("MP: "), 10) + player1.mp); Console.SetCursorPosition(left + 3, 5); Console.Write(Ultils.FormatText(MyLocalization.GetText("HP: "), 10) + player2.hp + "\t" + Ultils.FormatText(MyLocalization.GetText("MP: "), 10) + player2.mp); } }
public void ChooseCharacterView() { Console.Clear(); characterView.PrintListCharacter(); Console.Write(MyLocalization.GetText("Please choose a player (Enter the ID): ")); int idCharacter1 = int.Parse(Console.ReadLine()); Console.Write(MyLocalization.GetText("Please choose a player (Enter the ID): ")); int idCharacter2 = int.Parse(Console.ReadLine()); CharacterProperties dataPlayer1 = characterManager.GetCharater(idCharacter1); CharacterProperties dataPlayer2 = characterManager.GetCharater(idCharacter2); StartBattle(dataPlayer1, dataPlayer2); }
private void GetCarStatus(int index) { topspeeddone = car_stat[Key[index]].Information.TSD; acceleratingdone = car_stat[Key[index]].Information.ACD; corneringdone = car_stat[Key[index]].Information.COD; brakedone = car_stat[Key[index]].Information.BRD; Topspeed_Up_Text.text = CalcUpgradePrice(index, topspeeddone).ToString(); Acceleration_Up_Text.text = CalcUpgradePrice(index, acceleratingdone).ToString(); Cornering_Up_Text.text = CalcUpgradePrice(index, corneringdone).ToString(); Break_Up_Text.text = CalcUpgradePrice(index, brakedone).ToString(); current_Car_Text.text = MyLocalization.Exchange("currentcartext") + " : " + MyLocalization.Exchange(car_stat[Key[index]].CarName); current_Car_Text2.text = current_Car_Text.text; }
public void RaceEnd(FinishType finishState) { if (!isGamePlaying) { return; } switch (finishState) { case FinishType.Finish: Spots_Count(); float personalTrackRecord = DesignConstStorage.PersonalTrackRecord[Game_Manager.Instance.track_manager.Current_Track_Name]; if (personalTrackRecord > Game_Manager.Instance.record_manager.Record_Time) { Game_Manager.Instance.SetTimeRecord(Game_Manager.Instance.track_manager.Current_Track_Name, Game_Manager.Instance.record_manager.Record_Time); Debug.LogWarning(Game_Manager.Instance.track_manager.Current_Track_Name); } break; case FinishType.FalseStart: Game_Manager.Instance.ui_manager.Fail_Racing_Reason_Text.text = MyLocalization.Exchange("falsestart"); Tip_Text.text = MyLocalization.Exchange("tip_1"); break; case FinishType.OutOfControl: Game_Manager.Instance.ui_manager.Fail_Racing_Reason_Text.text = MyLocalization.Exchange("speeding"); Tip_Text.text = MyLocalization.Exchange("tip_2"); break; case FinishType.PassThrough: Game_Manager.Instance.ui_manager.Fail_Racing_Reason_Text.text = MyLocalization.Exchange("brakefailure"); Tip_Text.text = MyLocalization.Exchange("tip_3"); break; } isGamePlaying = false; //시간 계산. //시간 기반으로 점수 구해서 할까 아니면 그냥 시간+@를 할까? //게임 보상도 넣어야.. //팝업 결과창 //확인 하면 UI로 Game_Manager.Instance.EndOfRace(finishState == FinishType.Finish); }
public void LearnSkillView() { PrintListCharacter(); Console.Write(MyLocalization.GetText("Choose a character to learn skill: ")); int idCharacter = Int16.Parse(Console.ReadLine()); skillview.PrintListSkill(); Console.Write(MyLocalization.GetText("\nChoose a skill to learn")); int idSkill = Int16.Parse(Console.ReadLine()); if (controller.LearnSkill(idCharacter, idSkill)) { Console.WriteLine(MyLocalization.GetText("Learnt Successfully!!")); } else { Console.WriteLine(MyLocalization.GetText("The character has already learnt this skill")); } }
public void Menu_Car() { Topspeed.maxValue = Game_Manager.Instance.select_car.Topspeed.maxValue; Acceleration.maxValue = Game_Manager.Instance.select_car.Acceleration.maxValue; Cornering.maxValue = Game_Manager.Instance.select_car.Cornering.maxValue; Brake.maxValue = Game_Manager.Instance.select_car.Brake.maxValue; Topspeed.value = Game_Manager.Instance.select_car.Topspeed.value; Acceleration.value = Game_Manager.Instance.select_car.Acceleration.value; Cornering.value = Game_Manager.Instance.select_car.Cornering.value; Brake.value = Game_Manager.Instance.select_car.Brake.value; Carname_Text.text = Game_Manager.Instance.select_car.Carname_Text.text; Topspeed_Text.text = MyLocalization.Exchange("topspeed") + " : " + Topspeed.value; Acceleration_Text.text = MyLocalization.Exchange("acceleration") + " : " + Acceleration.value; Cornering_Text.text = MyLocalization.Exchange("cornering") + " : " + Cornering.value; Break_Text.text = MyLocalization.Exchange("braking") + " : " + Brake.value; }
public void CreatNewSkillEffectView() { while (true) { Console.Clear(); Console.WriteLine(MyLocalization.GetText("Creation Skill Effect View") + "\n\n"); for (int i = -3; i < 3; i++) { ESkillEffect type = (ESkillEffect)i; Console.WriteLine(type.ToString() + " : " + i); } Console.Write("\n" + Ultils.FormatText(MyLocalization.GetText("Choose Type Action (Enter Value):"), 45)); ESkillEffect typeAction = (ESkillEffect)int.Parse(Console.ReadLine()); for (int i = 0; i < 4; i++) { ETypeEffect type = (ETypeEffect)i; Console.WriteLine(type.ToString() + " : " + i); } Console.Write("\n" + Ultils.FormatText(MyLocalization.GetText("Choose Type Effect (Enter Value)"), 45)); ETypeEffect typeEffect = (ETypeEffect)int.Parse(Console.ReadLine()); Console.Write(Ultils.FormatText(MyLocalization.GetText("Enter Level Skill Effect:"), 45)); int levelSkillEffect = int.Parse(Console.ReadLine()); Console.WriteLine(Ultils.FormatText(MyLocalization.GetText("Enter Effect Value:"), 45)); float effectValue = float.Parse(Console.ReadLine()); Console.WriteLine(Ultils.FormatText(MyLocalization.GetText("Enter Time Exist:"), 45)); float timeExist = float.Parse(Console.ReadLine()); Console.WriteLine(Ultils.FormatText(MyLocalization.GetText("Enter Ratio Success:"), 45)); float ratioSuccess = float.Parse(Console.ReadLine()); Console.WriteLine(Ultils.FormatText(MyLocalization.GetText("Enter Time Distance:"), 45)); float timeDistance = float.Parse(Console.ReadLine()); Console.WriteLine(Ultils.FormatText(MyLocalization.GetText("Enter Ratio Out Break:"), 45)); float ratioOutBreak = float.Parse(Console.ReadLine()); skillEffectManager.CreateNewSkillEffect(typeAction, typeEffect, levelSkillEffect, effectValue, timeDistance, ratioSuccess, timeDistance, ratioOutBreak); Console.WriteLine(MyLocalization.GetText("Created and saved successfully!")); Console.WriteLine(MyLocalization.GetText("Press 'Enter' continue to enter, press any key to exit")); ConsoleKeyInfo key = Console.ReadKey(); if (key.Key != ConsoleKey.Enter) { break; } } }
public static void Init() { takeLoginReward = false; oldChat = new List <string>(); logined = false; IsInviter = false; Status = GameStatus.Start; GameZones = new List <GameZone>(); localization = new MyLocalization(); battleType = BattleMode.None; itemReward = new Dictionary <int, int>(); pvaLogs = new List <PvALog>(); pvpLogs = new List <PvPLog>(); uiReport = new List <UIReport>(); dungeonCurEvent = 0; dungeonEventCount = 0; battleTime = 0; tutorial = new TutorialManager(); autoSkillConfig = new AutoSkillConfig(); }
public void Racing_Record_Finish() { finish_time = System.DateTime.Now.ToString("HHmmssfff"); int result = (int.Parse(finish_time) - (int)(Record_Time * 1000f)); if (Record_Time >= 59.999f) { Record_Time = 59.999f; } if (int.Parse(start_time) - 100 <= result || result <= int.Parse(start_time) + 100) { if (detection_start == int.Parse(start_time) % Game_Manager.Instance.ServerTimeChecker) { Total_Record_Text.text = "00 : " + Record_Time.ToString("N3"); if (Game_Manager.Instance.car_direction.Bonus) { Penalty_Text.text = " - " + Game_Manager.Instance.car_direction.Penalty.ToString("N3"); Penalty_Text.GetComponent <Text>().color = new Color(100 / 255f, 220 / 255f, 0 / 255f); Record_Text.text = "00 : " + (Record_Time + Game_Manager.Instance.car_direction.Penalty).ToString("N3"); Penalty_Bonus_Text.text = MyLocalization.Exchange("bonus"); } else if (Game_Manager.Instance.car_direction.Bonus == false) { Penalty_Text.text = " + " + Game_Manager.Instance.car_direction.Penalty.ToString("N3"); Penalty_Text.GetComponent <Text>().color = new Color(255 / 255f, 0 / 255f, 0 / 255f); Record_Text.text = "00 : " + (Record_Time - Game_Manager.Instance.car_direction.Penalty).ToString("N3"); Penalty_Bonus_Text.text = MyLocalization.Exchange("penalty"); } else if (Game_Manager.Instance.car_direction.Bonus == false && Game_Manager.Instance.car_direction.Penalty == 0) { Penalty_Text.gameObject.SetActive(false); } //DesignConstStorage.PersonalTrackRecord.Add(DesignConstStorage.TrackDataTable.Rows[PlayerPrefs.GetInt("select", 0)].Get<string>("index"), Record_Time); } } else { Debug.Log("기록 조작 의심."); } }
public void PrintInfoPlayer(CharacterProperties dataPlayer1, CharacterProperties dataPlayer2) { //Player 1 Info Ultils.Border(40, 6, left, top); Console.SetCursorPosition(left + 10, top + 2); Console.WriteLine(MyLocalization.GetText("Player 1")); Console.SetCursorPosition(left + 3, Console.CursorTop); Console.WriteLine(Ultils.FormatText((MyLocalization.GetText("Name")), 20) + "\t" + dataPlayer1.characterName); Console.SetCursorPosition(left + 3, Console.CursorTop); Console.WriteLine(Ultils.FormatText(MyLocalization.GetText("HP: "), 10) + dataPlayer1.hp + "\t" + Ultils.FormatText(MyLocalization.GetText("MP: "), 10) + dataPlayer1.mp); //Player 2 Info left = width / 2 + 10; Ultils.Border(40, 6, left, top); Console.SetCursorPosition(left + 10, top + 2); Console.WriteLine(MyLocalization.GetText("Player 2")); Console.SetCursorPosition(left + 3, Console.CursorTop); Console.WriteLine(Ultils.FormatText((MyLocalization.GetText("Name")), 20) + "\t" + dataPlayer2.characterName); Console.SetCursorPosition(left + 3, Console.CursorTop); Console.WriteLine(Ultils.FormatText(MyLocalization.GetText("HP: "), 10) + dataPlayer2.hp + "\t" + Ultils.FormatText(MyLocalization.GetText("MP: "), 10) + dataPlayer2.mp); }
public void CreatNewSkillView() { while (true) { Console.Clear(); Console.WriteLine(MyLocalization.GetText("Creation Skill View") + "\n\n"); Console.Write(Ultils.FormatText(MyLocalization.GetText("Enter Skill Name"), 45)); string skillName = Console.ReadLine(); Console.Write(Ultils.FormatText(MyLocalization.GetText("Enter Description"), 45)); string description = Console.ReadLine(); skillEffectView.PrintListSkillEffect(); List <int> listIdSkillEffect = new List <int>(); while (true) { Console.Write(MyLocalization.GetText("Choose Skill Effect (Enter Value):")); int idSkillEffect = int.Parse(Console.ReadLine()); listIdSkillEffect.Add(idSkillEffect); Console.WriteLine(Ultils.FormatText(MyLocalization.GetText("Press 'Enter' continue to enter, press any key to exit"), 45)); ConsoleKeyInfo keyconfirm = Console.ReadKey(); if (keyconfirm.Key != ConsoleKey.Enter) { break; } } Console.Write(Ultils.FormatText(MyLocalization.GetText("Enter Time Used:"), 45)); float timeUsed = float.Parse(Console.ReadLine()); Console.Write(Ultils.FormatText(MyLocalization.GetText("Enter Time Cool Down:"), 45)); float timeCoolDown = float.Parse(Console.ReadLine()); Console.Write(Ultils.FormatText(MyLocalization.GetText("Enter MP Used:"), 45)); int mpUsed = int.Parse(Console.ReadLine()); adapter.CreateNewSkill(skillName, description, listIdSkillEffect.ToArray(), timeUsed, timeCoolDown, mpUsed, 1); Console.WriteLine(MyLocalization.GetText("Created and saved successfully!")); Console.WriteLine(MyLocalization.GetText("Press 'Enter' continue to enter, press any key to exit")); ConsoleKeyInfo key = Console.ReadKey(); if (key.Key != ConsoleKey.Enter) { break; } } }
public void Click_N_Btn() { if (car_stat.Count > car + 3) { car += 3; Car1_T.text = MyLocalization.Exchange(car_stat[Key[car]].CarName); car_active(car_stat.Count % 3); //switch (car_stat.Count % 3) //{ // case 0: // Car2_T.text = MyLocalization.Exchange(car_stat[Key[car + 1]].CarName); // Car3_T.text = MyLocalization.Exchange(car_stat[Key[car + 2]].CarName); // break; // case 1: // break; // case 2: // Car2_T.text = MyLocalization.Exchange(car_stat[Key[car + 1]].CarName); // break; //} } Car_Image_Text(car); }
public void CharacterCreation() { Console.WriteLine(MyLocalization.GetText("Creation Character View")); Console.OutputEncoding = Encoding.UTF8; Console.Write(Ultils.FormatText(MyLocalization.GetText("Enter Character's name"), 50)); string name = Console.ReadLine(); Console.Write(Ultils.FormatText(MyLocalization.GetText("Enter Character's HP"), 50)); float hp = float.Parse(Console.ReadLine()); Console.Write(Ultils.FormatText(MyLocalization.GetText("Enter Character's MP"), 50)); float mp = float.Parse(Console.ReadLine()); Console.Write(Ultils.FormatText(MyLocalization.GetText("Enter Character's HP Regen"), 50)); float hpRegen = float.Parse(Console.ReadLine()); Console.Write(Ultils.FormatText(MyLocalization.GetText("Enter Character's MP Regen"), 50)); float mpRegen = float.Parse(Console.ReadLine()); characterManager.CreateCharacter(name, hp, mp, hpRegen, mpRegen); Console.WriteLine(MyLocalization.GetText("Created and saved successfully!")); }
private void Awake() { dumpMemory = new char[UnityEngine.Random.Range(0, 500)]; if (instance == null) { instance = this; DontDestroyOnLoad(this.gameObject); } //backendManager.ServerTimer(); //PlayerPrefs.DeleteAll(); //Current_Language = Application.systemLanguage.ToString(); if (PlayerPrefs.GetInt("localized", 0) == 1) { LanguageOption.Initialize(SystemLanguage.English); Title_Image.sprite = Eng_Title_Image; } else if (PlayerPrefs.GetInt("localized", 0) == 2) { LanguageOption.Initialize(SystemLanguage.Korean); Title_Image.sprite = Kor_Title_Image; } else { if (Application.systemLanguage == SystemLanguage.Korean) { Title_Image.sprite = Kor_Title_Image; } else { Title_Image.sprite = Eng_Title_Image; } LanguageOption.Initialize(Application.systemLanguage); } User_ID_Text.text = "User ID : " + PlayerPrefs.GetString(DesignConstStorage.PlayerCustomID); Warning_Text.text = MyLocalization.Exchange("warning"); }
public void CarInit(PlayingCarModifier cStat) { current_Car = cStat; isBooster = false; float sizeFactor = 1; switch (current_Car.ModedCarStat.Information.Size) { case Car_Information.CarSize.Big: sizeFactor = 1.1f; break; case Car_Information.CarSize.Normal: sizeFactor = 1.0f; break; case Car_Information.CarSize.Compact: sizeFactor = 0.9f; break; case Car_Information.CarSize.Small: sizeFactor = 0.8f; break; } this.gameObject.transform.localScale = baseObjectSize * sizeFactor; trackPostions = Game_Manager.Instance.track_manager.Section_vecs; CurrentSpeed = 0; curveAngle = 0; curveDamage = 0; car_component.sprite = Resources.Load <Sprite>(string.Format(path, current_Car.ModedCarStat.CarName)); isGamePlaying = true; spots = new List <GameObject>(); currentHP = current_Car.MaxHP; sectionIndex = 0; this.gameObject.transform.position = currentSection[0]; destinationIndex = 0; d_State = Drive_State.Wait; m_State = Moving_State.Parking; //Load_Status(); //Debug.LogError(string.Format("{0} {1} {2} {3}", current_Car.TopSpeed, current_Car.Acceleration, current_Car.Brake, current_Car.Cornering)); SetDestination(); Car_Rotation(); Red = 70; Green = 200; brake_Btn_Image.sprite = start_Image; Balance_Text.text = MyLocalization.Exchange("balance"); Start_Btn.SetActive(true); Brake_Image.SetActive(false); }
private void current_Text(int i) { current_Track_Text.text = MyLocalization.Exchange("currenttracktext") + " : " + map_name(select); current_Track_Text2.text = MyLocalization.Exchange("currenttracktext") + " : " + map_name(PlayerPrefs.GetInt("select", 0)); Map_Page_T.text = ((i / 3) + 1) + " / " + Page; }
public void PrintSkill(SkillData skill) { Console.WriteLine("\n" + Ultils.FormatText(skill.id.ToString(), 10) + Ultils.FormatText(skill.skillName, 25) + Ultils.FormatText(skill.description, 20) + Ultils.FormatText(skill.timeUsed.ToString()) + Ultils.FormatText(skill.timeCooldown.ToString()) + Ultils.FormatText(skill.mpUsed.ToString())); Console.WriteLine(MyLocalization.GetText("Skill Effect")); PrintEffectOfSKill(skill); }
public void Click_Car() { for (int i = 0; i < car_stat.Count; i++) { if (EventSystem.current.currentSelectedGameObject.GetComponentInChildren <Text>().text == MyLocalization.Exchange(car_stat[Key[i]].CarName)) { Index = i; Current_Active_Btn(i); StatSliderAndText(i); GetCarStatus(i); Select_Car_Image.sprite = Resources.Load <Sprite>(string.Format(path, car_stat[Key[i]].CarName)); } } }
private void Setting_Category(string category_name) { for (int i = 0; i < Store_Key.Count; i++) { if (Item_Parents.transform.childCount != 0) { DestroyImmediate(Item_Parents.transform.GetChild(0).gameObject); } } Select_Item_List.Clear(); //int first = Store_Key.Count; List <Store_Information> iList = new List <Store_Information>(); foreach (var v in Store_Dic.Values) { if (v.Category == category_name) { if (!iList.Contains(v)) { iList.Add(v); } } } foreach (var t in iList) { if (!t.IsPurchased) { item = Instantiate(Item, new Vector2(0, 0), Quaternion.identity); item.transform.SetParent(Item_Parents.transform, false); item.name = t.Item_Name; if (t.Category == "Package") { item.transform.GetChild(0).GetComponent <Text>().text = MyLocalization.Exchange(t.Item_Name); } else { if (t.Item_List[0] == Store_Information.ItemType.car) { item.transform.GetChild(0).GetComponent <Text>().text = MyLocalization.Exchange(t.Value_List[0]); } else { item.transform.GetChild(0).GetComponent <Text>().text = MyLocalization.Exchange(string.Format("{0}_", t.Item_List[0].ToString()), t.Value_List[0]); } } //item.transform.GetChild(0).GetComponent<Text>().text = MyLocalization.Exchange(t.Item_Name); item.transform.GetChild(1).GetComponent <Image>().sprite = Resources.Load <Sprite>(string.Format("image/{0}", t.Item_Name)); item.transform.GetChild(2).GetComponent <Text>().text = t.Price; if (t.Price_Type == WealthManager.WealthType.RealMoney) { item.transform.GetChild(2).GetComponent <RectTransform>().anchoredPosition = new Vector3(0, 80, 0); item.transform.GetChild(2).GetChild(0).gameObject.SetActive(false); } else { item.transform.GetChild(2).GetComponent <RectTransform>().anchoredPosition = new Vector3(50, 80, 0); item.transform.GetChild(2).GetChild(0).gameObject.SetActive(true); } //Debug.Log(t); Select_Item_List.Add(item); } } first_item = Store_Key.Count; for (int i = 0; i < Store_Key.Count; i++) { Reset_Item(i, category_name); } Item_Parents.transform.Reset(); }
public void Initialized() { Store_Dic = new Dictionary <string, Store_Information>(); for (int i = 0; i < 4; i++) { information_List.Add(Inforamtion_Parents.transform.GetChild(i).gameObject); } //게임 시작시 처음 상점 세팅 for (int i = 0; i < DesignConstStorage.StoreTable.Rows.Count; i++) { Store_Information store_information = new Store_Information(); bool isInitialized = store_information.Initialize(DesignConstStorage.StoreTable.Rows[i]); if (isInitialized) { Store_Dic.Add(store_information.Item_Name, store_information); } } for (int i = 0; i < DesignConstStorage.CarPriceTable.Rows.Count; i++) { Store_Information store_information = new Store_Information(); switch (DesignConstStorage.CarPriceTable.Rows[i].Get <string>("wealthtype")) { case "realmoney": string index = DesignConstStorage.CarPriceTable.Rows[i].Get <string>("index"); switch (index) { case DesignConstStorage.RealMoneyCarName5500: if (Store_Dic.ContainsKey("car_5500")) { store_information = Store_Dic["car_5500"]; } break; case DesignConstStorage.RealMoneyCarName27500: if (Store_Dic.ContainsKey("car_27500")) { store_information = Store_Dic["car_27500"]; } break; default: Debug.LogError("Not Defined Item"); break; } if (store_information != null) { Store_Dic.Add(index, store_information); } break; default: bool isInitialized = store_information.Initialize(DesignConstStorage.CarPriceTable.Rows[i], true); if (isInitialized) { Store_Dic.Add(store_information.Item_Name, store_information); } break; } } while (Category_Parents.transform.childCount != 0) { DestroyImmediate(Category_Parents.transform.GetChild(0).gameObject); } category_List.Clear(); Store_Key = new List <string>(Store_Dic.Keys); for (int i = 0; i < DesignConstStorage.StoreTable.Rows.Count; i++) { if (category_List.Contains(Store_Dic[Store_Key[i]].Category) == false && !Store_Dic[Store_Key[i]].IsPurchased) // 처음 카테고리 버튼 생성 (중복 x) { GameObject category = Instantiate(Category, new Vector2(0, 0), Quaternion.identity); category.transform.SetParent(Category_Parents.transform, false); category.name = Store_Dic[Store_Key[i]].Category; category.transform.GetChild(0).GetComponent <Text>().text = MyLocalization.Exchange(DesignConstStorage.StoreTable.Rows[i].Get <string>("category")); if (category.transform.GetChild(0).GetComponent <Text>().preferredWidth > 250) { category.transform.GetComponent <RectTransform>().sizeDelta = new Vector3(category.transform.GetChild(0).GetComponent <Text>().preferredWidth + 50, 120, 0); } else { category.transform.GetComponent <RectTransform>().sizeDelta = new Vector3(250, 120, 0); } category_List.Add(category.name); } } }
public void Localize() { switch (Language) { case SystemLanguage.Korean: Language = SystemLanguage.English; Lan_Text.text = "ENG"; PlayerPrefs.SetInt("localized", 1); break; case SystemLanguage.English: Language = SystemLanguage.Korean; Lan_Text.text = "KOR"; PlayerPrefs.SetInt("localized", 2); break; default: Language = SystemLanguage.English; Lan_Text.text = "ENG"; PlayerPrefs.SetInt("localized", 1); break; } LanguageOption.Initialize(Language); for (int i = 0; i < Text_arr.Length - 1; i++) { Text_arr[i].GetComponent <TextLocalization>().textAsset.GetComponent <Text>().text = MyLocalization.Exchange(Text_arr[i].GetComponent <TextLocalization>().localizationKey); } Game_Manager.Instance.Initialize(null); }