18 lines
218 B
GDScript
18 lines
218 B
GDScript
extends Area2D
|
|
class_name Food
|
|
|
|
var hp:float=100
|
|
var hungry:float=100
|
|
|
|
|
|
|
|
func _ready() -> void:
|
|
|
|
pass
|
|
|
|
|
|
#被吃掉,比如如果要建立一个全局,可以用这个函数删掉
|
|
func eated():
|
|
|
|
self.queue_free()
|