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:
@@ -1,11 +0,0 @@
|
||||
extends Interactable
|
||||
class_name TruckRecharge
|
||||
|
||||
func interact(_p: Player) -> bool:
|
||||
|
||||
if planet == null:
|
||||
return false
|
||||
|
||||
planet.pass_day()
|
||||
|
||||
return true
|
||||
@@ -0,0 +1,20 @@
|
||||
extends Interactable
|
||||
class_name TruckRecharge
|
||||
|
||||
func can_interact(_p : Player) -> bool:
|
||||
return (
|
||||
planet != null
|
||||
and planet.data
|
||||
and planet.data.charges > 0
|
||||
)
|
||||
|
||||
func interact(_p: Player) -> bool:
|
||||
|
||||
if can_interact(_p):
|
||||
planet.data.charges -= 1
|
||||
planet.pass_day()
|
||||
|
||||
%Bolt.modulate = Color.WHITE if planet.data.charges > 0 else Color.RED
|
||||
|
||||
return true
|
||||
return false
|
||||
@@ -1,6 +1,6 @@
|
||||
[gd_scene load_steps=6 format=3 uid="uid://d324mlmgls4fs"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bsrn3gd2a532q" path="res://entities/interactables/truck/recharge/scripts/recharge_station.gd" id="1_ipgcv"]
|
||||
[ext_resource type="Script" uid="uid://bsrn3gd2a532q" path="res://entities/interactables/truck/recharge/scripts/truck_recharge.gd" id="1_ipgcv"]
|
||||
[ext_resource type="Texture2D" uid="uid://dlrj7tyi5wfh8" path="res://entities/interactables/truck/assets/sprites/truck_ladder.png" id="2_87dtp"]
|
||||
[ext_resource type="Texture2D" uid="uid://dcgnamu7sb3ov" path="res://common/icons/bolt.svg" id="3_jcfmm"]
|
||||
|
||||
@@ -29,5 +29,6 @@ scale = Vector2(0.5, 0.5)
|
||||
texture = SubResource("AtlasTexture_ot7vv")
|
||||
|
||||
[node name="Bolt" type="Sprite2D" parent="."]
|
||||
unique_name_in_owner = true
|
||||
position = Vector2(0, -15)
|
||||
texture = ExtResource("3_jcfmm")
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
[gd_scene load_steps=6 format=3 uid="uid://d324mlmgls4fs"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bsrn3gd2a532q" path="res://entities/interactables/truck/recharge/scripts/truck_recharge.gd" id="1_ipgcv"]
|
||||
[ext_resource type="Texture2D" uid="uid://dlrj7tyi5wfh8" path="res://entities/interactables/truck/assets/sprites/truck_ladder.png" id="2_87dtp"]
|
||||
[ext_resource type="Texture2D" uid="uid://dcgnamu7sb3ov" path="res://common/icons/bolt.svg" id="3_jcfmm"]
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_bjhct"]
|
||||
radius = 26.0
|
||||
height = 106.0
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_ot7vv"]
|
||||
atlas = ExtResource("2_87dtp")
|
||||
region = Rect2(64, 161, 101, 205)
|
||||
|
||||
[node name="TruckRecharge" type="Area2D"]
|
||||
script = ExtResource("1_ipgcv")
|
||||
default_interact_text = "RECHARGE"
|
||||
default_info_title = "RECHARGE_STATION"
|
||||
default_info_desc = "RECHARGE_STATION_DESC_TEXT"
|
||||
metadata/_custom_type_script = "uid://dyprcd68fjstf"
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
position = Vector2(1, -14)
|
||||
shape = SubResource("CapsuleShape2D_bjhct")
|
||||
|
||||
[node name="RechargeStation" type="Sprite2D" parent="."]
|
||||
position = Vector2(0, -17)
|
||||
scale = Vector2(0.5, 0.5)
|
||||
texture = SubResource("AtlasTexture_ot7vv")
|
||||
|
||||
[node name="Bolt" type="Sprite2D" parent="."]
|
||||
unique_name_in_owner = true
|
||||
position = Vector2(0, -15)
|
||||
texture = ExtResource("3_jcfmm")
|
||||
@@ -0,0 +1,31 @@
|
||||
[gd_scene load_steps=6 format=3 uid="uid://d324mlmgls4fs"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bsrn3gd2a532q" path="res://entities/interactables/truck/recharge/scripts/truck_recharge.gd" id="1_ipgcv"]
|
||||
[ext_resource type="Texture2D" uid="uid://dlrj7tyi5wfh8" path="res://entities/interactables/truck/assets/sprites/truck_ladder.png" id="2_87dtp"]
|
||||
[ext_resource type="Texture2D" uid="uid://dcgnamu7sb3ov" path="res://common/icons/bolt.svg" id="3_jcfmm"]
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_bjhct"]
|
||||
radius = 26.0
|
||||
height = 106.0
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_ot7vv"]
|
||||
atlas = ExtResource("2_87dtp")
|
||||
region = Rect2(64, 161, 101, 205)
|
||||
|
||||
[node name="TruckRecharge" type="Area2D"]
|
||||
script = ExtResource("1_ipgcv")
|
||||
metadata/_custom_type_script = "uid://dyprcd68fjstf"
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
position = Vector2(1, -14)
|
||||
shape = SubResource("CapsuleShape2D_bjhct")
|
||||
|
||||
[node name="RechargeStation" type="Sprite2D" parent="."]
|
||||
position = Vector2(0, -17)
|
||||
scale = Vector2(0.5, 0.5)
|
||||
texture = SubResource("AtlasTexture_ot7vv")
|
||||
|
||||
[node name="Bolt" type="Sprite2D" parent="."]
|
||||
unique_name_in_owner = true
|
||||
position = Vector2(0, -15)
|
||||
texture = ExtResource("3_jcfmm")
|
||||
@@ -0,0 +1,31 @@
|
||||
[gd_scene load_steps=6 format=3 uid="uid://d324mlmgls4fs"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bsrn3gd2a532q" path="res://entities/interactables/truck/recharge/scripts/truck_recharge.gd" id="1_ipgcv"]
|
||||
[ext_resource type="Texture2D" uid="uid://dlrj7tyi5wfh8" path="res://entities/interactables/truck/assets/sprites/truck_ladder.png" id="2_87dtp"]
|
||||
[ext_resource type="Texture2D" uid="uid://dcgnamu7sb3ov" path="res://common/icons/bolt.svg" id="3_jcfmm"]
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_bjhct"]
|
||||
radius = 26.0
|
||||
height = 106.0
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_ot7vv"]
|
||||
atlas = ExtResource("2_87dtp")
|
||||
region = Rect2(64, 161, 101, 205)
|
||||
|
||||
[node name="TruckRecharge" type="Area2D"]
|
||||
script = ExtResource("1_ipgcv")
|
||||
metadata/_custom_type_script = "uid://dyprcd68fjstf"
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
position = Vector2(1, -14)
|
||||
shape = SubResource("CapsuleShape2D_bjhct")
|
||||
|
||||
[node name="RechargeStation" type="Sprite2D" parent="."]
|
||||
position = Vector2(0, -17)
|
||||
scale = Vector2(0.5, 0.5)
|
||||
texture = SubResource("AtlasTexture_ot7vv")
|
||||
|
||||
[node name="Bolt" type="Sprite2D" parent="."]
|
||||
unique_name_in_owner = true
|
||||
position = Vector2(0, -15)
|
||||
texture = ExtResource("3_jcfmm")
|
||||
Reference in New Issue
Block a user