mirror of
https://github.com/Steffo99/hella-farm.git
synced 2024-11-27 18:44:23 +00:00
20 lines
435 B
GDScript
20 lines
435 B
GDScript
@icon("res://behaviours/sacrificable.svg")
|
|
extends Node
|
|
class_name Sacrificable
|
|
|
|
|
|
## Emits [signal eaten] when eaten by an [Eater] whose acceptable diets contain this node's [field diet].
|
|
##
|
|
## To add multiple possible [Edible] diets to an entity, add multiple [Edible] nodes to it.
|
|
|
|
signal sacrificed
|
|
|
|
|
|
@export var kind: StringName = &""
|
|
|
|
|
|
func set_kind(value: StringName) -> void:
|
|
kind = value
|
|
|
|
func sacrifice():
|
|
sacrificed.emit()
|