Compare commits
2 commits
6418952c59
...
77c005e5db
| Author | SHA1 | Date | |
|---|---|---|---|
| 77c005e5db | |||
| d3dba783cf |
4 changed files with 8 additions and 5 deletions
|
|
@ -19,6 +19,10 @@ config/icon="res://icon.svg"
|
|||
|
||||
EventBus="*res://scenes/autoload/event_bus.tscn"
|
||||
|
||||
[debug]
|
||||
|
||||
gdscript/warnings/untyped_declaration=2
|
||||
|
||||
[display]
|
||||
|
||||
window/size/viewport_width=320
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
extends Node
|
||||
|
||||
@warning_ignore("unused_signal")
|
||||
signal ball_hit(player: int, velocity: Vector2)
|
||||
|
||||
func _ready():
|
||||
func _ready() -> void:
|
||||
process_mode = Node.PROCESS_MODE_ALWAYS
|
||||
|
|
|
|||
|
|
@ -31,5 +31,6 @@ func _on_hit(hitbox: Area2D) -> void:
|
|||
EventBus.ball_hit.emit(player.id, linear_velocity)
|
||||
is_hit = true
|
||||
|
||||
|
||||
func _on_hit_end() -> void:
|
||||
is_hit = false
|
||||
|
|
|
|||
|
|
@ -6,9 +6,6 @@ extends Area2D
|
|||
func _ready() -> void:
|
||||
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:
|
||||
queue_free()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue