void OnCollisionEnter(Collision collision) { if (!isLeapMenuTet) { TetrominoState tetrominoState = transform.gameObject.GetComponent<TetrominoState> (); // TODO: Merge this & apply state changes... this code initalizes the lose screen if (tetrominoState.getState() == TetrominoState.states.INACTIVE && collision.gameObject.name == "roof") { GameObject go = GameObject.Find("Main Camera"); _classicModeState = (Classic)go.GetComponent(typeof(Classic)); _classicModeState.InitLoseScreen(); } foreach (Transform child in transform) { child.GetComponent<Renderer> ().material.color = Color.grey; } tetrominoState.setState (TetrominoState.states.INACTIVE); } }