save work and menu
This commit is contained in:
@@ -15,7 +15,7 @@ var delay_dup := 0.0
|
||||
|
||||
func _ready() -> void:
|
||||
add_to_group("asteroid")
|
||||
SPEED = randf() / 50 +50
|
||||
|
||||
rotation = randf_range(0.0, 360.0)
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
@@ -47,8 +47,8 @@ func split():
|
||||
second.direction = direction
|
||||
first.global_position = position + (2**type * nor)
|
||||
first.type = type-1
|
||||
first.set_collision_layer(3)
|
||||
second.set_collision_layer(3)
|
||||
first.SPEED = SPEED
|
||||
second.SPEED = SPEED
|
||||
second.global_position = position - (2**type * nor)
|
||||
second.type = type-1
|
||||
var parent = get_parent()
|
||||
@@ -65,4 +65,7 @@ func _on_body_entered(body: Node) -> void:
|
||||
elif body.is_in_group("shoot"):
|
||||
body.destroy = true
|
||||
body.queue_free()
|
||||
GameController.emit_signal("point_gain", type)
|
||||
split()
|
||||
elif body is Ship and !body.is_inv():
|
||||
GameController.emit_signal("player_hit")
|
||||
|
||||
Reference in New Issue
Block a user