Made kamikaze behavior and also fixed borders
This commit is contained in:
parent
ac263a1e65
commit
1ee0b529a8
10 changed files with 41 additions and 44 deletions
|
|
@ -24,7 +24,8 @@ func _ready() -> void:
|
|||
destroyed.connect(destroy_timeout)
|
||||
|
||||
func destroy_timeout():
|
||||
get_tree().create_timer(0.02).timeout.connect(destroy)
|
||||
destroy()
|
||||
get_tree().create_timer(0.05).timeout.connect(hull.warp_to_position.bind(spawn_position))
|
||||
|
||||
## Reset all required variables
|
||||
func destroy() -> void:
|
||||
|
|
@ -32,7 +33,6 @@ func destroy() -> void:
|
|||
hull.linear_velocity = Vector2.ZERO
|
||||
hull.angular_velocity = 0.0
|
||||
shield.capacity = shield.max_capacity
|
||||
hull.warp_to_position(spawn_position)
|
||||
|
||||
## Swaps old hull with the new one
|
||||
func change_hull(new_hull_id: String) -> void:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue