police car weak point

This commit is contained in:
Michael Campbell 2026-02-18 16:46:00 -05:00
parent 324e7d437b
commit 8a173b968d
15 changed files with 203 additions and 9 deletions

View file

@ -4,7 +4,7 @@ extends CollisionObject3D
func _ready() -> void:
scale.y = randf_range(.5, 1.25)
func hit(_proj: PlayerProjectile) -> void:
func hit(_proj: PlayerProjectile) -> bool:
print("boom!")
SignalBus.building_destroyed.emit(self)
collision_layer = 1 # World collision only
@ -13,3 +13,4 @@ func hit(_proj: PlayerProjectile) -> void:
%DestroyedMesh.show()
%GPUParticles3D.preprocess = randf()
return true

View file

@ -7,7 +7,7 @@ func _get_spawn_pos() -> Vector3:
return curve.samplef(randf_range(0, curve.point_count))
func _spawn_police_car(p: Vector3) -> void:
var car: Node3D = preload("police_car.tscn").instantiate()
var car: Node3D = preload("res://enemies/police_car/police_car.tscn").instantiate()
car.position = p + Vector3.UP * 0.1
add_sibling(car)