private void Start() { myAV = FindObjectOfType <AvatarChoice>(); int value = myAV.avchoice; if (value == 1) { myA = FindObjectOfType <ScoreA>(); } else if (value == 2) { myB = FindObjectOfType <ScoreB>(); } else if (value == 3) { myC = FindObjectOfType <ScoreC>(); } else if (value == 4) { myD = FindObjectOfType <ScoreD>(); } else if (value == 5) { myE = FindObjectOfType <ScoreE>(); } else if (value == 6) { myF = FindObjectOfType <ScoreF>(); } else if (value == 7) { myG = FindObjectOfType <ScoreG>(); } }
void Start() { bonus.SetActive(false); bt_home.onClick.AddListener(navigate_toHome); highscore2 = PlayerPrefs.GetInt("current_lvl2highscore"); nodechoice = PlayerPrefs.GetInt("current_selected_note"); gameoverpanel.SetActive(false); myAV = FindObjectOfType <AvatarChoice>(); int value = myAV.avchoice; if (value == 1) { myA = FindObjectOfType <ScoreA>(); } else if (value == 2) { myB = FindObjectOfType <ScoreB>(); } else if (value == 3) { myC = FindObjectOfType <ScoreC>(); } else if (value == 4) { myD = FindObjectOfType <ScoreD>(); } else if (value == 5) { myE = FindObjectOfType <ScoreE>(); } else if (value == 6) { myF = FindObjectOfType <ScoreF>(); } else if (value == 7) { myG = FindObjectOfType <ScoreG>(); } //screenHalfSizeWorldUnits = new Vector2(Camera.main.aspect * Camera.main.orthographicSize, Camera.main.orthographicSize-1f); user_selection.Load_PlayerPrefs(); if (nodechoice == 1) { StartCoroutine(SpawnA()); } else if (nodechoice == 2) { StartCoroutine(SpawnB()); } else if (nodechoice == 3) { StartCoroutine(SpawnC()); } else if (nodechoice == 4) { StartCoroutine(SpawnD()); } timerText.text = Mathf.RoundToInt(timeLeft).ToString(); }