void handleLoseState() { if (onLoseDone == true) { if (pnlLose.active == false) { pnlLose.SetActive(true); onLoseDone = false; } } else { violent.SetActive(false); student.SetActive(false); ShapeController sShapeController = shapeControllerObj.GetComponent <ShapeController>(); sShapeController.handleStopGame(); lose.onLose(); } }