Skip to content

Commit 41f60f6

Browse files
committed
Fixed Missile collision with buildings under construction
1 parent 8a7b94c commit 41f60f6

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

Assets/EC2018/BuildingController.cs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,15 @@ public void Setup (Building building) {
8686
SetConstructionParameters (startScale);
8787
}
8888

89-
if(timeLeft <= 0) {
90-
isUnderConstruction = false;
91-
}
89+
if(building.BuildingType == BuildingType.Tesla || building.BuildingType == BuildingType.Defense) {
90+
if(timeLeft < 0) {
91+
isUnderConstruction = false;
92+
}
93+
} else {
94+
if(timeLeft <= 0) {
95+
isUnderConstruction = false;
96+
}
97+
}
9298

9399
if(building.BuildingType == BuildingType.Tesla) {
94100
if(timeLeft == 9) {

0 commit comments

Comments
 (0)