private void PlaceBuilding() { GameObject placedObject = Instantiate(_placingGameObject, _placingGameObject.transform.position, _placingGameObject.transform.rotation); //Can possibly be refactored into the ConstructionObject's start method ConstructionObject constructionObject = placedObject.GetComponent <ConstructionObject>(); constructionObject.PlaceObject(); // GridController.Get.PlaceObjectOnGrid(constructionObject.transform.position, constructionObject.Shape); CancelBuildMode(); }
public void SetBuilding(ConstructionObject construction) { _placingGameObject = Instantiate(construction.gameObject); _constructionObject = _placingGameObject.GetComponent <ConstructionObject>(); _buildMode = true; }