private void Start() { toCameraCaller = Camera.main.backgroundColor; mainCam = Camera.main.transform; camMoveToPosition = 4.51f + nowCube.y - 1f; AllCubesRB = AllCubes.GetComponent <Rigidbody>(); showCubePlace = StartCoroutine(ShowCubePlace()); }
private void Start() { scoreTxt.text = "<color=white><size=50>Best: </size> <b>" + PlayerPrefs.GetInt("score") + "</b>\n<size=40> Now: </size> <b>0</b></color>"; toCameraColor = Camera.main.backgroundColor; mainCam = Camera.main.transform; camMoveToYPosition = 5.9f + nowCube.y - 1f; allCubesRb = AllCubes.GetComponent <Rigidbody>(); showCubePlace = StartCoroutine(ShowCubePlace()); }
void OnDisable() { if (activeLose) { LoseBut.SetActive(true); } if (activePlayText) { PlayText.SetActive(true); } detectClicks.GetComponent <BoxCollider> ().enabled = true; AllCubes.SetActive(false); }
void OnEnable() { if (PlayText.activeSelf) { activePlayText = true; PlayText.SetActive(false); } detectClicks.GetComponent <BoxCollider> ().enabled = false; AllCubes.SetActive(true); if (LoseBut.activeSelf) { activeLose = true; LoseBut.SetActive(false); } }