texture_builder + growing sprites

This commit is contained in:
Altaezio
2026-02-13 16:49:14 +01:00
parent e6d34a50a5
commit e305e3213d
10 changed files with 239 additions and 218 deletions

View File

@@ -16,9 +16,9 @@ func update_plant_sprite(plant_data : PlantData, with_animation = false):
await %AnimationPlayer.animation_finished
%Sprite.flip_h = true if plant_data.random_seed%2 == 0 else false
%Sprite.texture = %TextureBuilder.build_plant_texture(plant_data)
%Sprite.texture = PlantTextureBuilder.build_plant_texture(plant_data)
%PlantedSeed.texture = %TextureBuilder.build_seed_texture(plant_data.random_seed)
%PlantedSeed.texture = PlantTextureBuilder.build_seed_texture(plant_data.random_seed)
%PlantedSeed.visible = plant_data.get_state() == PlantData.State.PLANTED
# %PlantedSeed.region_rect = Rect2(