minor code cleanup
This commit is contained in:
parent
d3dba783cf
commit
77c005e5db
3 changed files with 4 additions and 5 deletions
|
|
@ -1,6 +1,7 @@
|
||||||
extends Node
|
extends Node
|
||||||
|
|
||||||
|
@warning_ignore("unused_signal")
|
||||||
signal ball_hit(player: int, velocity: Vector2)
|
signal ball_hit(player: int, velocity: Vector2)
|
||||||
|
|
||||||
func _ready():
|
func _ready() -> void:
|
||||||
process_mode = Node.PROCESS_MODE_ALWAYS
|
process_mode = Node.PROCESS_MODE_ALWAYS
|
||||||
|
|
|
||||||
|
|
@ -31,5 +31,6 @@ func _on_hit(hitbox: Area2D) -> void:
|
||||||
EventBus.ball_hit.emit(player.id, linear_velocity)
|
EventBus.ball_hit.emit(player.id, linear_velocity)
|
||||||
is_hit = true
|
is_hit = true
|
||||||
|
|
||||||
|
|
||||||
func _on_hit_end() -> void:
|
func _on_hit_end() -> void:
|
||||||
is_hit = false
|
is_hit = false
|
||||||
|
|
|
||||||
|
|
@ -6,9 +6,6 @@ extends Area2D
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
timer.connect("timeout", _despawn)
|
timer.connect("timeout", _despawn)
|
||||||
|
|
||||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
|
||||||
func _process(delta: float) -> void:
|
|
||||||
pass
|
|
||||||
|
|
||||||
func _despawn() -> void:
|
func _despawn() -> void:
|
||||||
queue_free()
|
queue_free()
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue