private void setStatus() { wins_me.GetComponent <Text>().text = PlayerPrefs.GetInt("total_wins", 0) + ""; money_me.GetComponent <Text>().text = LanguageSystem.GET_CURRENCY() + PlayerPrefs.GetInt("money", 0); rank_me.GetComponent <Image>().sprite = rankList[PlayerPrefs.GetInt("rank", 4)]; name_me.GetComponent <Text>().text = PlayerPrefs.GetString("name", LanguageSystem.GET_NAME()); }
void Start() { if (GameObject.Find(MainMenu.ArraysDataName) == null) { SceneManager.LoadScene("Assets/Scenes/Main Menu.unity", LoadSceneMode.Single); return; } arraysData = GameObject.Find(MainMenu.ArraysDataName).GetComponent <ArraysData>(); startedCoroutineBombKnife = new Queue <Coroutine>(); Application.targetFrameRate = 300; online = gameObject.GetComponent <GameScriptOnline>(); GameObject data = GameObject.Find("Data"); isOnline = data != null; if (isOnline) { EndGameShow.addPlays(-1); online_data = data.GetComponent <OnlineData>(); strategy = Online.WRITE; rank = (PlayerPrefs.GetInt("rank", 4) + online_data.rank_him) / 2; } else { rank = PlayerPrefs.GetInt("rank", 4); strategy = Online.OFFLINE; hideOnlineObjects(); } isT = isOnline? online_data.getTeam() : Random.Range(0, 2) == 1; initializeMyTeam(); gameMode = 0; enemysNameList = new List <String>(); kills = 0; round = (WIN_SCORE - round_per_half); ctScore = round / 2; tScore = round - ctScore; yourName = PlayerPrefs.GetString("name", LanguageSystem.GET_NAME()); maxLooks = isT ? T_aimPoints.Length : CT_aimPoints.Length; getEnemySpawn().initEnemysFirstNameList(START_ENEMY_COUNT, isOnline); newTeam(); resetLook(); beforeNewRound(); }
public void configure(bool ctIsDeath, int weaponCode, bool isHeadShot, bool isWall, String killerName, String killedName) { if (PlayerPrefs.GetString("name", LanguageSystem.GET_NAME()).Equals(killerName)) { // you killed GetComponent <Image>().color = new Color32(142, 42, 52, 64); } if (PlayerPrefs.GetString("name", LanguageSystem.GET_NAME()).Equals(killedName)) { // you death GetComponent <Image>().color = new Color32(200, 62, 75, 128); } killerNameLabel.GetComponent <Text>().text = killerName + " "; killedNameLabel.GetComponent <Text>().text = " " + killedName; headImg.SetActive(isHeadShot); wallImg.SetActive(isWall); weopenImg.GetComponent <Image>().sprite = weapons[weaponCode]; StartCoroutine(AdjustTransInTheEndOfFrame(ctIsDeath)); }
void Start() { RequestInterstitial(); game = GameObject.Find("MOVABLE").GetComponent <GameScript>(); ppImg.GetComponent <Image>().sprite = GameObject.Find(MainMenu.ArraysDataName).GetComponent <ArraysData>().ppList[PlayerPrefs.GetInt("pp", 2)]; tot_kills = PlayerPrefs.GetInt("total_kill", 0); winns = PlayerPrefs.GetInt("total_wins", 0); money = PlayerPrefs.GetInt("money", 0); rank = PlayerPrefs.GetInt("rank", 4); newWin = PlayerPrefs.GetInt("new_win", 0); kills = PlayerPrefs.GetInt("new_kills", 0); name = PlayerPrefs.GetString("name", LanguageSystem.GET_NAME()); winSerie = PlayerPrefs.GetInt("winSerie", 0); loseSerie = PlayerPrefs.GetInt("loseSerie", 0); a = nameLabel.GetComponent <UnityEngine.UI.Text>(); b = killsLabel.GetComponent <UnityEngine.UI.Text>(); c = winsLabel.GetComponent <UnityEngine.UI.Text>(); d = moneyLabel.GetComponent <UnityEngine.UI.Text>(); e = rankImg.GetComponent <Image>(); saveStatus(); writeStatus(); show(); }