ajout d'un indicateur de la base lors de l'exploration et changements divers
* suppression des deux dernières étapes du tutoriel * fix des particules de score * ajout du loop dans l'import de la dernière musique
This commit is contained in:
parent
b9a0a33ac7
commit
fb5a692cf4
@ -15,6 +15,7 @@ Molette : Changer l'objet en main
|
|||||||
X : Lâcher l’objet"
|
X : Lâcher l’objet"
|
||||||
STORY,Story,Histoire
|
STORY,Story,Histoire
|
||||||
OK,Ok,Ok
|
OK,Ok,Ok
|
||||||
|
GARDEN,Garden,Jardin
|
||||||
COMMA,", ",","
|
COMMA,", ",","
|
||||||
OR," or "," ou "
|
OR," or "," ou "
|
||||||
PAUSE,Pause,Pause
|
PAUSE,Pause,Pause
|
||||||
|
|||||||
|
@ -12,8 +12,8 @@ dest_files=["res://.godot/imported/forest_phase_3.ogg-55f42a1f5a8a4849a773f18490
|
|||||||
|
|
||||||
[params]
|
[params]
|
||||||
|
|
||||||
loop=false
|
loop=true
|
||||||
loop_offset=0
|
loop_offset=0.0
|
||||||
bpm=0
|
bpm=0.0
|
||||||
beat_count=0
|
beat_count=0
|
||||||
bar_beats=4
|
bar_beats=4
|
||||||
|
|||||||
@ -0,0 +1,19 @@
|
|||||||
|
extends InGameIndicator
|
||||||
|
class_name InGameBaseIndicator
|
||||||
|
|
||||||
|
@export var player : Player
|
||||||
|
|
||||||
|
# Called when the node enters the scene tree for the first time.
|
||||||
|
func _ready():
|
||||||
|
setup(tr("GARDEN"))
|
||||||
|
print(GameInfo.game_data.current_planet_data.garden_size/2)
|
||||||
|
follow_game_position(GameInfo.game_data.current_planet_data.garden_size/2)
|
||||||
|
|
||||||
|
func _process(_delta):
|
||||||
|
visible = player and (
|
||||||
|
player.global_position.x < 0
|
||||||
|
or player.global_position.x > GameInfo.game_data.current_planet_data.garden_size.x
|
||||||
|
or player.global_position.y < 0
|
||||||
|
or player.global_position.y > GameInfo.game_data.current_planet_data.garden_size.y
|
||||||
|
)
|
||||||
|
update()
|
||||||
@ -0,0 +1 @@
|
|||||||
|
uid://ds7ej47i3wsym
|
||||||
@ -33,7 +33,9 @@ func follow_entity(entity : Node2D):
|
|||||||
|
|
||||||
func _process(_d):
|
func _process(_d):
|
||||||
show()
|
show()
|
||||||
|
update()
|
||||||
|
|
||||||
|
func update():
|
||||||
var camera = get_viewport().get_camera_2d()
|
var camera = get_viewport().get_camera_2d()
|
||||||
|
|
||||||
var screen_size = get_viewport().get_visible_rect().size
|
var screen_size = get_viewport().get_visible_rect().size
|
||||||
|
|||||||
@ -13,8 +13,8 @@ var indicators : Array[InGameIndicator]
|
|||||||
TakeSeedStep.new(),
|
TakeSeedStep.new(),
|
||||||
PlantSeedStep.new(),
|
PlantSeedStep.new(),
|
||||||
RechargeStep.new(),
|
RechargeStep.new(),
|
||||||
WaitMaturePlant.new(),
|
# WaitMaturePlant.new(),
|
||||||
HarvestMaturePlant.new(),
|
# HarvestMaturePlant.new(),
|
||||||
]
|
]
|
||||||
var actual_step : Step = null : set = pass_to_step
|
var actual_step : Step = null : set = pass_to_step
|
||||||
|
|
||||||
|
|||||||
@ -1,10 +1,12 @@
|
|||||||
[gd_scene load_steps=10 format=3 uid="uid://d28cp7a21kwou"]
|
[gd_scene load_steps=12 format=3 uid="uid://d28cp7a21kwou"]
|
||||||
|
|
||||||
[ext_resource type="PackedScene" uid="uid://12nak7amd1uq" path="res://gui/game/game_gui.tscn" id="1_yy1uy"]
|
[ext_resource type="PackedScene" uid="uid://12nak7amd1uq" path="res://gui/game/game_gui.tscn" id="1_yy1uy"]
|
||||||
[ext_resource type="PackedScene" uid="uid://v41hfc7haaye" path="res://gui/game/win/win.tscn" id="3_6guxm"]
|
[ext_resource type="PackedScene" uid="uid://v41hfc7haaye" path="res://gui/game/win/win.tscn" id="3_6guxm"]
|
||||||
[ext_resource type="PackedScene" uid="uid://doxm7uab8i3tq" path="res://gui/game/quota_reward/quota_reward.tscn" id="4_fbkgs"]
|
[ext_resource type="PackedScene" uid="uid://doxm7uab8i3tq" path="res://gui/game/quota_reward/quota_reward.tscn" id="4_fbkgs"]
|
||||||
[ext_resource type="PackedScene" uid="uid://bgvbgeq46wee2" path="res://entities/player/player.tscn" id="4_g33f4"]
|
[ext_resource type="PackedScene" uid="uid://bgvbgeq46wee2" path="res://entities/player/player.tscn" id="4_g33f4"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://fh3dsuvn5h78" path="res://gui/game/tutorial/in_game_indicator/in_game_indicator.tscn" id="5_gisiu"]
|
||||||
[ext_resource type="PackedScene" uid="uid://dt6mptqg80dew" path="res://gui/game/tutorial/tutorial.tscn" id="5_orelw"]
|
[ext_resource type="PackedScene" uid="uid://dt6mptqg80dew" path="res://gui/game/tutorial/tutorial.tscn" id="5_orelw"]
|
||||||
|
[ext_resource type="Script" uid="uid://ds7ej47i3wsym" path="res://gui/game/tutorial/in_game_indicator/scripts/in_game_base_indicator.gd" id="6_cnjsq"]
|
||||||
[ext_resource type="PackedScene" uid="uid://tsi5j1uxppa4" path="res://stages/terrain/planet/planet.tscn" id="8_t31p7"]
|
[ext_resource type="PackedScene" uid="uid://tsi5j1uxppa4" path="res://stages/terrain/planet/planet.tscn" id="8_t31p7"]
|
||||||
[ext_resource type="PackedScene" uid="uid://cg1visg52i21a" path="res://entities/interactables/truck/ladder/truck_ladder.tscn" id="9_gisiu"]
|
[ext_resource type="PackedScene" uid="uid://cg1visg52i21a" path="res://entities/interactables/truck/ladder/truck_ladder.tscn" id="9_gisiu"]
|
||||||
[ext_resource type="PackedScene" uid="uid://d324mlmgls4fs" path="res://entities/interactables/truck/recharge/truck_recharge.tscn" id="10_cnjsq"]
|
[ext_resource type="PackedScene" uid="uid://d324mlmgls4fs" path="res://entities/interactables/truck/recharge/truck_recharge.tscn" id="10_cnjsq"]
|
||||||
@ -15,12 +17,12 @@
|
|||||||
[node name="Reward" parent="." instance=ExtResource("4_fbkgs")]
|
[node name="Reward" parent="." instance=ExtResource("4_fbkgs")]
|
||||||
layer = 2
|
layer = 2
|
||||||
|
|
||||||
[node name="CanvasLayer" type="CanvasLayer" parent="."]
|
[node name="RootGui" parent="." node_paths=PackedStringArray("quota_reward") instance=ExtResource("1_yy1uy")]
|
||||||
|
quota_reward = NodePath("../Reward")
|
||||||
[node name="RootGui" parent="CanvasLayer" node_paths=PackedStringArray("quota_reward") instance=ExtResource("1_yy1uy")]
|
|
||||||
quota_reward = NodePath("../../Reward")
|
|
||||||
metadata/_edit_use_anchors_ = true
|
metadata/_edit_use_anchors_ = true
|
||||||
|
|
||||||
|
[node name="CanvasLayer" type="CanvasLayer" parent="."]
|
||||||
|
|
||||||
[node name="Win" parent="CanvasLayer" instance=ExtResource("3_6guxm")]
|
[node name="Win" parent="CanvasLayer" instance=ExtResource("3_6guxm")]
|
||||||
visible = false
|
visible = false
|
||||||
|
|
||||||
@ -28,6 +30,14 @@ visible = false
|
|||||||
player = NodePath("../../Entities/Player")
|
player = NodePath("../../Entities/Player")
|
||||||
planet = NodePath("../../Planet")
|
planet = NodePath("../../Planet")
|
||||||
|
|
||||||
|
[node name="BaseIndicator" parent="CanvasLayer" node_paths=PackedStringArray("player") instance=ExtResource("5_gisiu")]
|
||||||
|
visible = false
|
||||||
|
offset_bottom = 91.0
|
||||||
|
size_flags_horizontal = 4
|
||||||
|
size_flags_vertical = 4
|
||||||
|
script = ExtResource("6_cnjsq")
|
||||||
|
player = NodePath("../../Entities/Player")
|
||||||
|
|
||||||
[node name="Entities" type="Node2D" parent="."]
|
[node name="Entities" type="Node2D" parent="."]
|
||||||
y_sort_enabled = true
|
y_sort_enabled = true
|
||||||
|
|
||||||
@ -50,5 +60,5 @@ position = Vector2(2.22, 0)
|
|||||||
following = NodePath("../Entities/Player")
|
following = NodePath("../Entities/Player")
|
||||||
|
|
||||||
[connection signal="day_limit_exceed" from="Planet" to="CanvasLayer/Win" method="_on_planet_day_limit_exceed"]
|
[connection signal="day_limit_exceed" from="Planet" to="CanvasLayer/Win" method="_on_planet_day_limit_exceed"]
|
||||||
[connection signal="pass_day_ended" from="Planet" to="CanvasLayer/RootGui" method="_on_planet_pass_day_ended"]
|
[connection signal="pass_day_ended" from="Planet" to="RootGui" method="_on_planet_pass_day_ended"]
|
||||||
[connection signal="pass_day_started" from="Planet" to="CanvasLayer/RootGui" method="_on_planet_pass_day_started"]
|
[connection signal="pass_day_started" from="Planet" to="RootGui" method="_on_planet_pass_day_started"]
|
||||||
|
|||||||
@ -66,6 +66,7 @@ func plant(
|
|||||||
)
|
)
|
||||||
|
|
||||||
plants.append(new_plant)
|
plants.append(new_plant)
|
||||||
|
planet_data.score_by_plant.append(0)
|
||||||
new_plant.harvested.connect(_on_plant_harvested)
|
new_plant.harvested.connect(_on_plant_harvested)
|
||||||
new_plant.state_changed.connect(_on_plant_state_changed)
|
new_plant.state_changed.connect(_on_plant_state_changed)
|
||||||
return new_plant
|
return new_plant
|
||||||
@ -80,6 +81,7 @@ func remove_plant(p: Plant):
|
|||||||
var id = plants.find(p)
|
var id = plants.find(p)
|
||||||
if id >= 0:
|
if id >= 0:
|
||||||
plants.remove_at(id)
|
plants.remove_at(id)
|
||||||
|
planet_data.score_by_plant.remove_at(id)
|
||||||
update_garden_score()
|
update_garden_score()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user