private void ReleseIfClicked() { BuildingController building = m_currentPlaceableObject.GetComponent <BuildingController>(); if (CheckCanPlace(building)) { if (Input.GetMouseButtonDown(0)) { DestoryTemporaryCollisionSphere(); m_currentPlaceableObject = null; building.m_settings.CreateCost(); building.ShaderChangeBase(); building.ColliderOn(); building.SetPlaced(true); GameController.Instance.SetCurrBuildingNumber(1, building); building = null; } } }