Compare commits
2 Commits
1179e04956
...
fb5a692cf4
| Author | SHA1 | Date | |
|---|---|---|---|
| fb5a692cf4 | |||
| b9a0a33ac7 |
@ -15,6 +15,7 @@ Molette : Changer l'objet en main
|
||||
X : Lâcher l’objet"
|
||||
STORY,Story,Histoire
|
||||
OK,Ok,Ok
|
||||
GARDEN,Garden,Jardin
|
||||
COMMA,", ",","
|
||||
OR," or "," ou "
|
||||
PAUSE,Pause,Pause
|
||||
|
||||
|
BIN
common/music/assets/morceaux/forest_phase_3.ogg
Normal file
BIN
common/music/assets/morceaux/forest_phase_3.ogg
Normal file
Binary file not shown.
19
common/music/assets/morceaux/forest_phase_3.ogg.import
Normal file
19
common/music/assets/morceaux/forest_phase_3.ogg.import
Normal file
@ -0,0 +1,19 @@
|
||||
[remap]
|
||||
|
||||
importer="oggvorbisstr"
|
||||
type="AudioStreamOggVorbis"
|
||||
uid="uid://d4lqhgf0lhgge"
|
||||
path="res://.godot/imported/forest_phase_3.ogg-55f42a1f5a8a4849a773f18490a0844b.oggvorbisstr"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://common/music/assets/morceaux/forest_phase_3.ogg"
|
||||
dest_files=["res://.godot/imported/forest_phase_3.ogg-55f42a1f5a8a4849a773f18490a0844b.oggvorbisstr"]
|
||||
|
||||
[params]
|
||||
|
||||
loop=true
|
||||
loop_offset=0.0
|
||||
bpm=0.0
|
||||
beat_count=0
|
||||
bar_beats=4
|
||||
@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=11 format=3 uid="uid://b6hscxcrj065q"]
|
||||
[gd_scene load_steps=12 format=3 uid="uid://b6hscxcrj065q"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://2p5d6vogtn82" path="res://common/music/scripts/music.gd" id="1_ji160"]
|
||||
[ext_resource type="AudioStream" uid="uid://diyefcv8tqa3r" path="res://common/music/assets/morceaux/forest_phase_1.ogg" id="1_stre8"]
|
||||
@ -7,6 +7,7 @@
|
||||
[ext_resource type="AudioStream" uid="uid://bm0tdi6bd2e65" path="res://common/music/assets/ambiance/ambiance_phase_2.ogg" id="5_a71a3"]
|
||||
[ext_resource type="AudioStream" uid="uid://dftxjfdqgsbd3" path="res://common/music/assets/ambiance/ambiance_phase_3.ogg" id="6_i5lxw"]
|
||||
[ext_resource type="AudioStream" uid="uid://brtjlgjqnrvcb" path="res://common/music/assets/morceaux/truck_music.ogg" id="7_a71a3"]
|
||||
[ext_resource type="AudioStream" uid="uid://d4lqhgf0lhgge" path="res://common/music/assets/morceaux/forest_phase_3.ogg" id="7_i5lxw"]
|
||||
|
||||
[sub_resource type="AudioStreamSynchronized" id="AudioStreamSynchronized_i5lxw"]
|
||||
stream_count = 3
|
||||
@ -18,11 +19,13 @@ stream_2/stream = ExtResource("6_i5lxw")
|
||||
stream_2/volume = -60.0
|
||||
|
||||
[sub_resource type="AudioStreamSynchronized" id="AudioStreamSynchronized_i0tje"]
|
||||
stream_count = 2
|
||||
stream_count = 3
|
||||
stream_0/stream = ExtResource("1_stre8")
|
||||
stream_0/volume = -60.0
|
||||
stream_1/stream = ExtResource("2_ji160")
|
||||
stream_1/volume = -60.0
|
||||
stream_2/stream = ExtResource("7_i5lxw")
|
||||
stream_2/volume = -60.0
|
||||
|
||||
[sub_resource type="AudioStreamSynchronized" id="AudioStreamSynchronized_w0e2r"]
|
||||
stream_count = 1
|
||||
|
||||
@ -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):
|
||||
show()
|
||||
update()
|
||||
|
||||
func update():
|
||||
var camera = get_viewport().get_camera_2d()
|
||||
|
||||
var screen_size = get_viewport().get_visible_rect().size
|
||||
|
||||
@ -13,8 +13,8 @@ var indicators : Array[InGameIndicator]
|
||||
TakeSeedStep.new(),
|
||||
PlantSeedStep.new(),
|
||||
RechargeStep.new(),
|
||||
WaitMaturePlant.new(),
|
||||
HarvestMaturePlant.new(),
|
||||
# WaitMaturePlant.new(),
|
||||
# HarvestMaturePlant.new(),
|
||||
]
|
||||
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://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://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="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://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"]
|
||||
@ -15,12 +17,12 @@
|
||||
[node name="Reward" parent="." instance=ExtResource("4_fbkgs")]
|
||||
layer = 2
|
||||
|
||||
[node name="CanvasLayer" type="CanvasLayer" parent="."]
|
||||
|
||||
[node name="RootGui" parent="CanvasLayer" node_paths=PackedStringArray("quota_reward") instance=ExtResource("1_yy1uy")]
|
||||
quota_reward = NodePath("../../Reward")
|
||||
[node name="RootGui" parent="." node_paths=PackedStringArray("quota_reward") instance=ExtResource("1_yy1uy")]
|
||||
quota_reward = NodePath("../Reward")
|
||||
metadata/_edit_use_anchors_ = true
|
||||
|
||||
[node name="CanvasLayer" type="CanvasLayer" parent="."]
|
||||
|
||||
[node name="Win" parent="CanvasLayer" instance=ExtResource("3_6guxm")]
|
||||
visible = false
|
||||
|
||||
@ -28,6 +30,14 @@ visible = false
|
||||
player = NodePath("../../Entities/Player")
|
||||
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="."]
|
||||
y_sort_enabled = true
|
||||
|
||||
@ -50,5 +60,5 @@ position = Vector2(2.22, 0)
|
||||
following = NodePath("../Entities/Player")
|
||||
|
||||
[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_started" from="Planet" to="CanvasLayer/RootGui" method="_on_planet_pass_day_started"]
|
||||
[connection signal="pass_day_ended" from="Planet" to="RootGui" method="_on_planet_pass_day_ended"]
|
||||
[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)
|
||||
planet_data.score_by_plant.append(0)
|
||||
new_plant.harvested.connect(_on_plant_harvested)
|
||||
new_plant.state_changed.connect(_on_plant_state_changed)
|
||||
return new_plant
|
||||
@ -80,6 +81,7 @@ func remove_plant(p: Plant):
|
||||
var id = plants.find(p)
|
||||
if id >= 0:
|
||||
plants.remove_at(id)
|
||||
planet_data.score_by_plant.remove_at(id)
|
||||
update_garden_score()
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user