developpement d'écran de chargement et d'écran de sélection de niveau
* modification de certains assets * optimisation de chunks * ajout d'un SceneManager * ajout d'un premier dialogue avec Demeter * changement des jour en charge * mise en place d'un système de run * etc...
This commit is contained in:
@@ -10,10 +10,10 @@ func _init():
|
||||
|
||||
@export var settings : SettingsData = SettingsData.new()
|
||||
|
||||
@export var current_planet_data : PlanetData = PlanetData.new() :
|
||||
set(v):
|
||||
current_planet_data = v
|
||||
current_planet_data_updated.emit(v)
|
||||
@export var current_run : RunData = RunData.new()
|
||||
|
||||
@export var current_planet_data : PlanetData : get = get_current_planet_data
|
||||
|
||||
@export var player_data : PlayerData = PlayerData.new()
|
||||
|
||||
@export var unlocked_plant_types : Array[PlantType] = []
|
||||
@@ -22,12 +22,19 @@ func _init():
|
||||
|
||||
@export var truck_data : TruckData = TruckData.new()
|
||||
|
||||
func _ready():
|
||||
current_run.run_point_changed.connect(
|
||||
func(): current_planet_data_updated.emit(get_current_planet_data)
|
||||
)
|
||||
|
||||
func set_default_unlocked():
|
||||
unlocked_plant_types = all_plant_types()
|
||||
unlocked_plant_mutations = all_plant_mutations()
|
||||
unlocked_machines = all_machines()
|
||||
|
||||
func reset_planet():
|
||||
current_planet_data = PlanetData.new()
|
||||
func reset_run():
|
||||
current_run = RunData.new()
|
||||
current_planet_data_updated.emit()
|
||||
|
||||
func reset_player():
|
||||
player_data = PlayerData.new()
|
||||
@@ -36,7 +43,7 @@ func reset_truck():
|
||||
truck_data = TruckData.new()
|
||||
|
||||
func reset_all():
|
||||
reset_planet()
|
||||
reset_run()
|
||||
reset_player()
|
||||
reset_truck()
|
||||
|
||||
@@ -55,6 +62,9 @@ func get_locked_plant_types() -> Array[PlantType]:
|
||||
|
||||
return locked_plant_type
|
||||
|
||||
func get_current_planet_data():
|
||||
return current_run.get_current_planet_data()
|
||||
|
||||
func is_plant_type_unlocked(new_plant_type : PlantType):
|
||||
return unlocked_plant_types.find_custom(
|
||||
func (upt : PlantType): return new_plant_type.name == upt.name
|
||||
|
||||
Reference in New Issue
Block a user