void DropOnBuilding() { CityBuildingModel hoveredBuilding = CityRaycaster.GetHoveredBuilding(); if (hoveredBuilding != null && !(hoveredBuilding.IsExplored && !hoveredBuilding.OccupiableAfterSecuring)) { Model.AssignToBuilding(hoveredBuilding); UpdateView(); } }
private void LateUpdate() { if (dragging) { Draggable.position = Input.mousePosition; CityRaycaster.CastForBuildings(); } else { Draggable.anchoredPosition = Vector2.Lerp(Draggable.anchoredPosition, Vector2.zero, Time.deltaTime * LERP_SPEED); } }