1
Fork 0
mirror of https://github.com/Steffo99/hella-farm.git synced 2024-11-22 08:04:23 +00:00
hella-farm/behaviours/edible.gd

17 lines
349 B
GDScript3
Raw Normal View History

2024-04-15 22:04:55 +00:00
@icon("res://behaviours/edible.svg")
extends Node
class_name Edible
2024-04-15 20:43:26 +00:00
## 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.
2024-04-14 23:23:06 +00:00
signal eaten
2024-04-15 20:43:26 +00:00
@export var diet: StringName = &""
2024-04-13 22:23:33 +00:00
2024-04-15 20:43:26 +00:00
func eat():
eaten.emit()