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"
|
EventBus="*res://scenes/autoload/event_bus.tscn"
|
||||||
|
|
||||||
|
[debug]
|
||||||
|
|
||||||
|
gdscript/warnings/untyped_declaration=2
|
||||||
|
|
||||||
[display]
|
[display]
|
||||||
|
|
||||||
window/size/viewport_width=320
|
window/size/viewport_width=320
|
||||||
|
|
|
||||||
|
|
@ -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