wild jam prototype
This commit is contained in:
@@ -1,14 +1,21 @@
|
||||
extends CharacterBody2D
|
||||
class_name Entity
|
||||
|
||||
signal death
|
||||
signal death(entity: Entity)
|
||||
|
||||
var alliance: Buff.colors
|
||||
var attack_pow: int = 0
|
||||
var color := Color.WHITE
|
||||
@export var speed = 100
|
||||
@export var speed = 80
|
||||
var lives: int = 1
|
||||
|
||||
func received_buff(color: Buff.colors) -> void:
|
||||
if alliance == color:
|
||||
attack_pow += 6
|
||||
else:
|
||||
attack_pow -= 3
|
||||
|
||||
func hit() -> void:
|
||||
lives -= 1
|
||||
if lives <= 0:
|
||||
death.emit()
|
||||
queue_free()
|
||||
death.emit(self)
|
||||
|
||||
Reference in New Issue
Block a user