Peashooters

This commit is contained in:
Rendo 2025-08-09 21:35:02 +05:00
commit 68cfe89f1d
47 changed files with 1571 additions and 279 deletions

View file

@ -0,0 +1,18 @@
extends Area2D
var source : Entity
@export var speed : float
@export var damage : float
func _ready() -> void:
area_entered.connect(on_area_entered)
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _physics_process(delta: float) -> void:
global_position += global_transform.x * speed * delta
func on_area_entered(area : Area2D):
if area.get_parent() != null:
area.get_parent().deal_damage(damage, source)
queue_free()

View file

@ -0,0 +1 @@
uid://fgdhvaq4dek2