diff options
author | rom <romangraef@gmail.com> | 2021-04-26 22:10:29 +0200 |
---|---|---|
committer | rom <romangraef@gmail.com> | 2021-04-26 22:10:29 +0200 |
commit | 6fb5e447659efe06045b22a8cac7ef4d7a4445db (patch) | |
tree | f396db36e2b2834d279723076128debea6fd1242 | |
parent | 6494e91540657968e650cbccc65d8c063214e586 (diff) | |
download | ldjam48-6fb5e447659efe06045b22a8cac7ef4d7a4445db.tar.gz ldjam48-6fb5e447659efe06045b22a8cac7ef4d7a4445db.tar.bz2 ldjam48-6fb5e447659efe06045b22a8cac7ef4d7a4445db.zip |
wurgs
-rw-r--r-- | project.godot | 6 | ||||
-rw-r--r-- | scenes/levels/pixel/PixelDefender.gd | 5 | ||||
-rw-r--r-- | scenes/levels/pixel/spaceship.gd | 2 |
3 files changed, 10 insertions, 3 deletions
diff --git a/project.godot b/project.godot index 471262c..8780a66 100644 --- a/project.godot +++ b/project.godot @@ -39,6 +39,11 @@ _global_script_classes=[ { "language": "GDScript", "path": "res://components/PathRenderer.gd" }, { +"base": "Area2D", +"class": "Spaceship", +"language": "GDScript", +"path": "res://scenes/levels/pixel/spaceship.gd" +}, { "base": "Label", "class": "TextReveal", "language": "GDScript", @@ -51,6 +56,7 @@ _global_script_class_icons={ "Card": "", "Level": "", "PathRenderer": "", +"Spaceship": "", "TextReveal": "" } diff --git a/scenes/levels/pixel/PixelDefender.gd b/scenes/levels/pixel/PixelDefender.gd index 2667238..3b01148 100644 --- a/scenes/levels/pixel/PixelDefender.gd +++ b/scenes/levels/pixel/PixelDefender.gd @@ -63,9 +63,8 @@ func _on_enemy_area_shape_entered(area_id, area, area_shape, local_shape, e): return if area is Bullet: area.queue_free() - elif area.team == Bullet.CHAOS: - return - e.queue_free() + elif area is Spaceship and area.team == Bullet.ORDER: + e.queue_free() func _on_spaceship_area_shape_entered(area_id, area, area_shape, local_shape): if area is Bullet: diff --git a/scenes/levels/pixel/spaceship.gd b/scenes/levels/pixel/spaceship.gd index 3c39665..ab6fc49 100644 --- a/scenes/levels/pixel/spaceship.gd +++ b/scenes/levels/pixel/spaceship.gd @@ -1,2 +1,4 @@ extends Area2D + +class_name Spaceship var team = Bullet.ORDER |