finishing rockets

This commit is contained in:
OddlyTimbot committed 2026-07-06 12:30:43 -04:00
1 parent 4eb6966ef1
commit 5fb367e082
3 files changed
+7

No files matched your search

+4
View File
@@ -49,3 +49,7 @@ func crateTotal(howmany):
func bulletDamage(body, _bullet)->void:
if body.is_in_group("shootable"):
destroySignal.emit(body)
func rocketDamage(body, rocket)->void:
if body.is_in_group("shootable"):
print("Rocket strikes target!")
destroySignal.emit(body)
+1
View File
@@ -92,5 +92,6 @@ func makeRocket(spawnPosition, direction, speed)->void:
print("make a rocket")
var myRocket:Rocket = rocketFactory()
myRocket.splodeSignal.connect(destroy)
myRocket.impactSignal.connect(game.rocketDamage)
myRocket.transform = spawnPosition
pushTarget(myRocket,direction*speed)