système de sauvegarde, scène 3D de test sur la base astra et passage en forward+

This commit is contained in:
2026-02-06 10:28:36 +01:00
parent 83d462f2f4
commit cc421a951f
97 changed files with 2138 additions and 1007 deletions

View File

@@ -13,7 +13,7 @@ func _ready():
GameInfo.game_data.current_region_data.plant_changing_score.connect(_on_plant_changing_score)
GameInfo.game_data.player_data.updated.connect(_on_player_updated)
GameInfo.game_data.current_region_data.pass_day_ended.connect(_on_region_pass_day_ended)
score_mirror = GameInfo.game_data.current_region_data.get_score()
charge_update(GameInfo.game_data.current_region_data)
@@ -51,6 +51,8 @@ func score_update(with_animation = true):
else: %QuotaProgressBar.value = objective_progression_percent
func _on_plant_changing_score(plant_data: PlantData, amount : int):
if GameInfo.game_data.current_region_data.in_passing_day_animation:
await GameInfo.game_data.current_region_data.pass_day_ended
if amount <= 0:
score_mirror += amount
else :
@@ -64,15 +66,13 @@ func _on_plant_changing_score(plant_data: PlantData, amount : int):
0.8
)
await get_tree().create_timer(0.3 / max(1,i)).timeout
await get_tree().create_timer(0.5 / max(1.,i)).timeout
func spawn_score_particle(
from_position,
to_position,
duration
):
if GameInfo.game_data.current_region_data.in_passing_day_animation:
await GameInfo.game_data.current_region_data.pass_day_ended
var sprite_particle = Sprite2D.new()
sprite_particle.texture = SCORE_ICON
%ScoreParticles.add_child(sprite_particle)