ajout d'une gui en 3d, d'un tuto et correction de bug à la pelletée
This commit is contained in:
@@ -171,7 +171,7 @@ _data = {
|
||||
}
|
||||
|
||||
[sub_resource type="FastNoiseLite" id="FastNoiseLite_5t1te"]
|
||||
seed = 811286534
|
||||
seed = -1559714386
|
||||
frequency = 1.0
|
||||
|
||||
[sub_resource type="Animation" id="Animation_koamw"]
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 236 KiB After Width: | Height: | Size: 243 KiB |
@@ -24,7 +24,6 @@ const DEFAULT_OBJECTIVE := 10
|
||||
|
||||
@export var state : State = State.IN_PROGRESS :
|
||||
set(v):
|
||||
print("Set state to %d" % v)
|
||||
state = v
|
||||
|
||||
@export var chunks_data : Dictionary[String, ChunkData]
|
||||
@@ -54,7 +53,6 @@ func _init(
|
||||
tutorial = parameter.tutorial
|
||||
|
||||
func update():
|
||||
print("Score %d > Objective %d" % [get_score(), objective] )
|
||||
if objective > 0 and get_score() >= objective:
|
||||
state = State.SUCCEEDED
|
||||
if state != State.SUCCEEDED and charges == 0:
|
||||
@@ -125,10 +123,15 @@ func add_plant_data(plant_data : PlantData, with_update = true):
|
||||
_on_plant_updated(plant_data)
|
||||
|
||||
func _on_plant_updated(plant_data : PlantData):
|
||||
print("for plant %s" % plant_data.plant_name)
|
||||
var old_plant_score = score_by_plant[plant_data]
|
||||
print("old score = %d" % old_plant_score)
|
||||
score_by_plant[plant_data] = plant_data.get_score()
|
||||
print("new score = %d" % score_by_plant[plant_data])
|
||||
|
||||
|
||||
if old_plant_score != score_by_plant[plant_data]:
|
||||
print("plant changin score")
|
||||
plant_changing_score.emit(plant_data, score_by_plant[plant_data] - old_plant_score)
|
||||
update()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user