ajout d'effet de post processing et réparation des graines
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
extends Node2D
|
||||
class_name DigParticleEmmitter
|
||||
|
||||
func _ready():
|
||||
func emit():
|
||||
%ExplosionParticles.emitting = true
|
||||
%ExplosionParticles.finished.connect(
|
||||
func (): queue_free()
|
||||
|
||||
Reference in New Issue
Block a user