ajout de 3 nouvelles plantes : ferno, philea et solita #93
This commit is contained in:
@@ -26,8 +26,11 @@ func all_plant_types() -> Array[PlantType]:
|
||||
return [
|
||||
preload("res://entities/plants/resources/plant_types/champ.tres"),
|
||||
preload("res://entities/plants/resources/plant_types/chardi.tres"),
|
||||
preload("res://entities/plants/resources/plant_types/ferno.tres"),
|
||||
preload("res://entities/plants/resources/plant_types/maias.tres"),
|
||||
preload("res://entities/plants/resources/plant_types/philea.tres"),
|
||||
preload("res://entities/plants/resources/plant_types/pili.tres"),
|
||||
preload("res://entities/plants/resources/plant_types/solita.tres"),
|
||||
]
|
||||
|
||||
func all_machines() -> Array[MachineType]:
|
||||
|
||||
@@ -39,10 +39,10 @@ func use(player : Player, zone : Player.ActionZone) -> bool:
|
||||
|
||||
func dig(areas: Array[Area2D], player: Player):
|
||||
for area in areas :
|
||||
if area is Plant:
|
||||
if area and area is Plant:
|
||||
player.play_sfx("harvest")
|
||||
area.harvest()
|
||||
if area is UndergroundLoot:
|
||||
if area and area is UndergroundLoot:
|
||||
player.play_sfx("dig")
|
||||
area.dig()
|
||||
await player.get_tree().create_timer(USE_INTERVAL).timeout
|
||||
|
||||
Reference in New Issue
Block a user