mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-06-04 02:37:12 +08:00
15 lines
344 B
GDScript
15 lines
344 B
GDScript
|
|
extends EntityBase
|
||
|
|
class_name SummonBase
|
||
|
|
|
||
|
|
@export var attraction: float = 0.0
|
||
|
|
|
||
|
|
var myMaster: EntityBase = null
|
||
|
|
|
||
|
|
func _ready():
|
||
|
|
for entity in get_tree().get_nodes_in_group("mobs"):
|
||
|
|
var ent = entity as EntityBase
|
||
|
|
if MathTool.rate(attraction):
|
||
|
|
ent.currentFocusedBoss = self
|
||
|
|
if is_instance_valid(myMaster):
|
||
|
|
myMaster.died.connect(tryDie)
|