ajout d'effet de post processing et réparation des graines

This commit is contained in:
2026-02-27 00:51:06 +01:00
parent a4662f2797
commit 8b3d5a98e1
19 changed files with 268 additions and 64 deletions

View File

@@ -59,6 +59,7 @@ func get_description() -> String:
return tr("PLANT_%s_MUST_BE_USED_IN_DECONTAMINATED_ZONE") % plant_name
func get_icon() -> Texture2D:
print("getting icon")
if stored_icon == null:
stored_icon = PlantTextureBuilder.build_seed_texture(plant_name.hash())
return stored_icon

View File

@@ -48,8 +48,9 @@ func use(player : Player, zone : Player.ActionZone) -> bool:
rock_layer.dig_rocks(zone.get_tiles())
var particles := (DIG_PARTICLES.instantiate() as Node2D)
var particles := (DIG_PARTICLES.instantiate() as DigParticleEmmitter)
player.region.add_child(particles)
particles.global_position = zone.get_global_position()
particles.emit()
return true

View File

@@ -20,6 +20,7 @@ unique_name_in_owner = true
amount = 10
lifetime = 1.0
speed_scale = 3.0
emission_sphere_radius = 60.0
spread = 50.0
gravity = Vector2(0, 400)
initial_velocity_min = 150.0

View File

@@ -1,6 +1,7 @@
extends Node2D
class_name DigParticleEmmitter
func _ready():
func emit():
%ExplosionParticles.emitting = true
%ExplosionParticles.finished.connect(
func (): queue_free()