void OnMouseDown() { //get parent script Tetris Piece Transform parent = gameObject.transform.parent; TetrisPiece pieceScript = (TetrisPiece)parent.GetComponent(typeof(TetrisPiece)); pieceScript.Selected(); }
void OnMouseDown() { //get parent script Tetris Piece Transform parent = gameObject.transform.parent; TetrisPiece pieceScript = (TetrisPiece)parent.GetComponent(typeof(TetrisPiece)); pieceScript.Selected(); }