Feature pour l'alpha 1.3
* Ajout d'un mode infini (pour nos hard core gamers) * Ajout d'un message de découverte d'un nouvel outil * Séparation de la pelle en deux outils : la pioche et la fourche * Amélioration de la lisibilité des capsules d'énergies * Changement léger des texture du sol et de la pierre * Correction d'un bug lors du clic frénétique sur le porte de sortie du vaisseau * Ajout d'un icône de recharge * Fix de la mutation Ancien qui ne s'améliorait pas au niveau 4 + début de dev des artefacts avec un distributeur
This commit is contained in:
@@ -11,43 +11,52 @@ var prev_mouse_pos : Vector2
|
||||
var next_mouse_pos : Vector2
|
||||
|
||||
func _ready():
|
||||
%Version.text = ProjectSettings.get_setting("application/config/version")
|
||||
%Start.text = tr("CONTINUE") if GameInfo.game_loaded else tr("START")
|
||||
%Restart.visible = GameInfo.game_loaded
|
||||
%Version.text = ProjectSettings.get_setting("application/config/version")
|
||||
%Start.text = tr("CONTINUE") if GameInfo.game_loaded else tr("START")
|
||||
%Restart.visible = GameInfo.game_loaded
|
||||
%ModeChoose.hide()
|
||||
|
||||
func _on_start_pressed():
|
||||
if GameInfo.game_data and GameInfo.game_data.last_game_scene:
|
||||
SceneManager.change_to_scene(GameInfo.game_data.last_game_scene)
|
||||
else:
|
||||
SceneManager.change_to_scene_id("INTRO")
|
||||
if GameInfo.game_data and GameInfo.game_data.last_game_scene:
|
||||
SceneManager.change_to_scene(GameInfo.game_data.last_game_scene)
|
||||
else:
|
||||
%ModeChoose.show()
|
||||
|
||||
func _process(delta):
|
||||
next_mouse_pos = get_viewport().get_mouse_position()
|
||||
if Input.is_action_just_pressed("action"):
|
||||
rotating = true
|
||||
prev_mouse_pos = get_viewport().get_mouse_position()
|
||||
if Input.is_action_just_released("action"):
|
||||
rotating = false
|
||||
planet_acceleration = Vector2(
|
||||
float(next_mouse_pos.x - prev_mouse_pos.x),
|
||||
float(next_mouse_pos.y - prev_mouse_pos.y)
|
||||
)
|
||||
|
||||
var planet_rotation = planet_acceleration
|
||||
next_mouse_pos = get_viewport().get_mouse_position()
|
||||
if Input.is_action_just_pressed("action"):
|
||||
rotating = true
|
||||
prev_mouse_pos = get_viewport().get_mouse_position()
|
||||
if Input.is_action_just_released("action"):
|
||||
rotating = false
|
||||
planet_acceleration = Vector2(
|
||||
float(next_mouse_pos.x - prev_mouse_pos.x),
|
||||
float(next_mouse_pos.y - prev_mouse_pos.y)
|
||||
)
|
||||
|
||||
var planet_rotation = planet_acceleration
|
||||
|
||||
if rotating:
|
||||
planet_rotation = Vector2(
|
||||
float(next_mouse_pos.x - prev_mouse_pos.x),
|
||||
float(next_mouse_pos.y - prev_mouse_pos.y)
|
||||
)
|
||||
prev_mouse_pos = next_mouse_pos
|
||||
else :
|
||||
planet_acceleration = planet_acceleration.lerp(DEFAULT_PLANET_ACCELERATION, 0.1)
|
||||
if rotating:
|
||||
planet_rotation = Vector2(
|
||||
float(next_mouse_pos.x - prev_mouse_pos.x),
|
||||
float(next_mouse_pos.y - prev_mouse_pos.y)
|
||||
)
|
||||
prev_mouse_pos = next_mouse_pos
|
||||
else :
|
||||
planet_acceleration = planet_acceleration.lerp(DEFAULT_PLANET_ACCELERATION, 0.1)
|
||||
|
||||
%Planet3d.rotate(Vector3.UP, planet_rotation.x * delta)
|
||||
%Planet3d.rotate(Vector3.RIGHT, planet_rotation.y * delta)
|
||||
%Planet3d.rotate(Vector3.UP, planet_rotation.x * delta)
|
||||
%Planet3d.rotate(Vector3.RIGHT, planet_rotation.y * delta)
|
||||
|
||||
|
||||
func _on_restart_button_down():
|
||||
GameInfo.restart_game_data()
|
||||
_on_start_pressed()
|
||||
GameInfo.restart_game_data()
|
||||
%ModeChoose.show()
|
||||
|
||||
|
||||
func _on_story_mode_start_button_down():
|
||||
SceneManager.change_to_scene_id("INTRO")
|
||||
|
||||
func _on_infinite_mode_start_button_down():
|
||||
GameInfo.game_data.game_mode = GameData.GameMode.INFINITE
|
||||
SceneManager.change_to_scene_id("COCKPIT")
|
||||
|
||||
@@ -9,11 +9,21 @@
|
||||
[ext_resource type="PackedScene" uid="uid://c8flevrkelpvy" path="res://gui/credits/socials/instagram.tscn" id="6_7a1qq"]
|
||||
[ext_resource type="PackedScene" uid="uid://bc3byq8e45ejj" path="res://gui/credits/socials/steam.tscn" id="7_nmsah"]
|
||||
[ext_resource type="Shader" uid="uid://bv2rghn44mrrf" path="res://stages/title_screen/resources/shaders/stars.gdshader" id="7_y6tw6"]
|
||||
[ext_resource type="Shader" uid="uid://cuni3ggtw2uuy" path="res://common/vfx/materials/shaders/blur.gdshader" id="8_pjo5j"]
|
||||
[ext_resource type="LabelSettings" uid="uid://dqwayi8yjwau2" path="res://gui/ressources/title_label_settings.tres" id="9_5mxqx"]
|
||||
[ext_resource type="Theme" uid="uid://5au2k3vf2po3" path="res://gui/ressources/menu.tres" id="10_tsp1v"]
|
||||
[ext_resource type="Texture2D" uid="uid://b75k12a4wc5t4" path="res://common/icons/book-2.svg" id="11_3aitq"]
|
||||
[ext_resource type="Texture2D" uid="uid://dbv5hm7lyi1f6" path="res://common/icons/infinity.svg" id="12_igvpv"]
|
||||
|
||||
[sub_resource type="ViewportTexture" id="ViewportTexture_6yuhi"]
|
||||
viewport_path = NodePath("SubViewport")
|
||||
|
||||
[sub_resource type="FastNoiseLite" id="FastNoiseLite_yctb5"]
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_lwj2x"]
|
||||
shader = ExtResource("8_pjo5j")
|
||||
shader_parameter/strength = 5.00000023424012
|
||||
shader_parameter/mix_percentage = 0.3
|
||||
|
||||
[sub_resource type="FastNoiseLite" id="FastNoiseLite_rf16a"]
|
||||
frequency = 1.0
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_7a1qq"]
|
||||
@@ -130,7 +140,6 @@ size_flags_horizontal = 3
|
||||
size_flags_vertical = 4
|
||||
|
||||
[node name="Socials" type="VBoxContainer" parent="MarginContainer" unique_id=1306915726]
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 8
|
||||
size_flags_vertical = 8
|
||||
@@ -140,14 +149,66 @@ layout_mode = 2
|
||||
size_flags_horizontal = 8
|
||||
|
||||
[node name="SteamButton" parent="MarginContainer/Socials" unique_id=1181450581 instance=ExtResource("7_nmsah")]
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
|
||||
[node name="ModeChoose" type="Control" parent="." unique_id=1527342716]
|
||||
unique_name_in_owner = true
|
||||
z_index = 2
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="ColorRect" type="ColorRect" parent="ModeChoose" unique_id=301172574]
|
||||
material = SubResource("ShaderMaterial_lwj2x")
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
color = Color(0.0352941, 0.0196078, 0.12549, 0.705882)
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="ModeChoose" unique_id=2135671035]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
alignment = 1
|
||||
|
||||
[node name="Label" type="Label" parent="ModeChoose/VBoxContainer" unique_id=513644546]
|
||||
layout_mode = 2
|
||||
text = "CHOOSE_GAME_MODE"
|
||||
label_settings = ExtResource("9_5mxqx")
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="StoryModeStart" type="Button" parent="ModeChoose/VBoxContainer" unique_id=1236564484]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
theme = ExtResource("10_tsp1v")
|
||||
text = "STORY_MODE"
|
||||
icon = ExtResource("11_3aitq")
|
||||
flat = true
|
||||
|
||||
[node name="InfiniteModeStart" type="Button" parent="ModeChoose/VBoxContainer" unique_id=516318256]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
theme = ExtResource("10_tsp1v")
|
||||
text = "INFINITE_MODE"
|
||||
icon = ExtResource("12_igvpv")
|
||||
flat = true
|
||||
|
||||
[node name="SubViewport" type="SubViewport" parent="." unique_id=1703203942]
|
||||
size = Vector2i(1980, 1080)
|
||||
|
||||
[node name="Planet3d" parent="SubViewport" unique_id=926789923 instance=ExtResource("5_7a1qq")]
|
||||
unique_name_in_owner = true
|
||||
noise = SubResource("FastNoiseLite_yctb5")
|
||||
noise = SubResource("FastNoiseLite_rf16a")
|
||||
|
||||
[node name="Camera3D" type="Camera3D" parent="SubViewport" unique_id=806252928]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -14.369979, 0, 64.323425)
|
||||
@@ -168,3 +229,5 @@ shadow_blur = 3.055
|
||||
|
||||
[connection signal="pressed" from="MarginContainer/GridContainer/VBoxContainer/VBoxContainer/Start" to="." method="_on_start_pressed"]
|
||||
[connection signal="button_down" from="MarginContainer/GridContainer/VBoxContainer/VBoxContainer/Restart" to="." method="_on_restart_button_down"]
|
||||
[connection signal="button_down" from="ModeChoose/VBoxContainer/StoryModeStart" to="." method="_on_story_mode_start_button_down"]
|
||||
[connection signal="button_down" from="ModeChoose/VBoxContainer/InfiniteModeStart" to="." method="_on_infinite_mode_start_button_down"]
|
||||
|
||||
Reference in New Issue
Block a user