mirror of
https://github.com/Steffo99/hella-farm.git
synced 2024-11-21 23:54:23 +00:00
Remove sacrifices
array cache from SummoningCircle
This commit is contained in:
parent
e71d872a5f
commit
74b01ffa00
1 changed files with 7 additions and 13 deletions
|
@ -7,21 +7,15 @@ class_name SacrificeCircle
|
||||||
@export var scene_imp: PackedScene
|
@export var scene_imp: PackedScene
|
||||||
|
|
||||||
|
|
||||||
var stones: Array[SacrificeStone]
|
## The [SacrificeStone]s part of this summoning circle.
|
||||||
var sacrifices: Array[Enums.MonsterType]
|
var stones: Array[SacrificeStone] = []
|
||||||
|
|
||||||
# Called when the node enters the scene tree for the first time.
|
|
||||||
func _ready() -> void:
|
|
||||||
stones = []
|
|
||||||
sacrifices = []
|
|
||||||
stones.assign(find_children("*", "SacrificeStone", true, false))
|
|
||||||
|
|
||||||
for stone in stones:
|
## Refresh the value of [field stones].
|
||||||
sacrifices.append(stone.current_type)
|
func refresh_stones() -> void:
|
||||||
|
stones.assign(
|
||||||
func refresh_sacrifices() -> void:
|
find_children("*", "SacrificeStone", false, false)
|
||||||
for i in len(stones):
|
)
|
||||||
sacrifices[i] = stones[i].current_type
|
|
||||||
|
|
||||||
func try_sacrifice() -> void:
|
func try_sacrifice() -> void:
|
||||||
var first_monster = sacrifices[0]
|
var first_monster = sacrifices[0]
|
||||||
|
|
Loading…
Reference in a new issue