瀏覽代碼

2D/space_shooter tweaks:
- renamed the project
- made the ship can't do shooting when killed

Indah Sylvia 8 年之前
父節點
當前提交
2666ea133b
共有 2 個文件被更改,包括 2 次插入3 次删除
  1. 1 1
      2d/space_shooter/engine.cfg
  2. 1 2
      2d/space_shooter/ship.gd

+ 1 - 1
2d/space_shooter/engine.cfg

@@ -1,6 +1,6 @@
 [application]
 
-name="Simple Shooter"
+name="Space Shooter"
 main_scene="res://main_menu.tscn"
 icon="res://icon.png"
 

+ 1 - 2
2d/space_shooter/ship.gd

@@ -35,7 +35,7 @@ func _fixed_process(delta):
 	
 	set_pos(pos)
 	
-	if (shooting and not prev_shooting):
+	if (shooting and not prev_shooting and not killed):
 		# Just pressed
 		var shot = preload("res://shot.tscn").instance()
 		# Use the Position2D as reference
@@ -65,7 +65,6 @@ func _hit_something():
 	get_node("../hud/game_over").show()
 	get_node("/root/game_state").game_over()
 	get_parent().stop()
-	set_process(false)
 
 
 func _on_ship_body_enter(body):