added attacks

This commit is contained in:
2024-02-14 07:09:32 -06:00
parent 8fc0ed9218
commit e6d1f5a8df
12 changed files with 251 additions and 20 deletions

14
scripts/entity.gd Normal file
View File

@@ -0,0 +1,14 @@
extends CharacterBody2D
class_name Entity
signal death
var color := Color.WHITE
@export var speed = 100
var lives: int = 1
func hit() -> void:
lives -= 1
if lives <= 0:
death.emit()
queue_free()