// Use this for initialization void Start() { character = Character.FindObjectOfType <Character> (); crewDescrip = NewGameScript.FindObjectOfType <NewGameScript> (); Text description1 = GetComponent <Text> (); Text crew1 = GetComponent <Text> (); Text crew2 = GetComponent <Text> (); Text crew3 = GetComponent <Text> (); crew1DescPanel.SetActive(false); UpdateDisplay(); }
void Start() { //GameObject resistance = GameObject.FindWithTag("RESISTANCE")as GameObject; //GameObject silverhawk = GameObject.FindWithTag("SILVERHAWK")as GameObject; if (PlayerPrefs.GetString("SHIP_CHOICE") == "SILVERHAWK") { isSilverhawk = true; } if (PlayerPrefs.GetString("SHIP_CHOICE") == "RESISTANCE") { isSilverhawk = false; } Debug.Log("where inside character is " + where); if (EnemyFireAndDamage.justWon == true /*|| where == "nope"*/) { //CreatePlayerShip(); EnemyFireAndDamage.justWon = false; } //DontDestroyOnLoad(transform.gameObject); newGameScript = NewGameScript.FindObjectOfType <NewGameScript>(); hasResetAlready = false; Debug.Log("Has reset already in start is " + hasResetAlready); XP = PlayerPrefs.GetInt("PLAYER_XP"); Level = PlayerPrefs.GetInt("PLAYER_LEVEL"); Weapon1 = PlayerPrefs.GetString("PRIMARY_WEAPON"); Credits = PlayerPrefs.GetInt("PLAYER_CREDITS"); if (isSilverhawk) { silverhawk.SetActive(true); resistance.SetActive(false); } if (isSilverhawk == false) { silverhawk.SetActive(false); resistance.SetActive(true); if (PlayerPrefs.GetInt("PlasmaLaserOnResistance") == 1) { //PlasmaLaserOnResistance.SetActive(true); } } }