Initial commit
This commit is contained in:
commit
a0b34dd454
54 changed files with 1826 additions and 0 deletions
11
scripts/boost.gd
Normal file
11
scripts/boost.gd
Normal file
|
@ -0,0 +1,11 @@
|
|||
extends Area2D
|
||||
|
||||
@export var boost_strength: float = 450.0 # Acceleration applied over time
|
||||
@onready var audio_stream_player: AudioStreamPlayer2D = $AudioStreamPlayer2D
|
||||
|
||||
|
||||
func _on_body_entered(body: Node2D) -> void:
|
||||
if body is CharacterBody2D:
|
||||
var direction = Vector2.RIGHT.rotated(rotation)
|
||||
body.velocity += direction * boost_strength
|
||||
audio_stream_player.play()
|
Loading…
Add table
Add a link
Reference in a new issue