فهرست منبع

:lipstick: Accelerate prompt

DricomDragon 1 ماه پیش
والد
کامیت
c25543eaaa

+ 36 - 0
godot/component/ui/input_prompts/jeep/jeep_prompts.tscn

@@ -0,0 +1,36 @@
+[gd_scene load_steps=5 format=3 uid="uid://sogwc56hcxlr"]
+
+[ext_resource type="Script" path="res://component/ui/input_prompts/prompt_container.gd" id="1_vo7iq"]
+[ext_resource type="Script" path="res://addons/input_prompts/action_prompt/action_prompt.gd" id="3_ql8fw"]
+
+[sub_resource type="InputEventKey" id="InputEventKey_eyt6c"]
+device = -1
+physical_keycode = 32
+unicode = 32
+
+[sub_resource type="InputEventJoypadButton" id="InputEventJoypadButton_3f2lm"]
+device = -1
+
+[node name="JeepPrompts" type="VBoxContainer"]
+offset_left = 193.0
+offset_right = 193.0
+offset_bottom = 100.0
+script = ExtResource("1_vo7iq")
+
+[node name="AcceleratePrompt" type="HBoxContainer" parent="."]
+layout_mode = 2
+script = ExtResource("1_vo7iq")
+
+[node name="AccelerateLabel" type="Label" parent="AcceleratePrompt"]
+layout_mode = 2
+theme_override_font_sizes/font_size = 34
+text = "Accelerate"
+
+[node name="AccelerateActionPrompt" type="TextureRect" parent="AcceleratePrompt"]
+custom_minimum_size = Vector2(100, 100)
+layout_mode = 2
+stretch_mode = 5
+script = ExtResource("3_ql8fw")
+action = "main"
+icon = 0
+events = Array[InputEvent]([SubResource("InputEventKey_eyt6c"), SubResource("InputEventJoypadButton_3f2lm")])

+ 1 - 0
godot/component/ui/input_prompts/prompt_container.gd

@@ -11,6 +11,7 @@ func _ready() -> void:
 	for child in get_children():
 		if child is InputPrompt:
 			child.pressed.connect(child.queue_free)
+		if child is InputPrompt or child is PromptContainer:
 			child.tree_exited.connect(_on_child_exited_tree)
 			_nb_prompts += 1
 

+ 5 - 1
godot/run/levels/infinite_level.tscn

@@ -1,4 +1,4 @@
-[gd_scene load_steps=36 format=3 uid="uid://7ivipmwaw24t"]
+[gd_scene load_steps=37 format=3 uid="uid://7ivipmwaw24t"]
 
 [ext_resource type="Texture2D" uid="uid://cgwafs6ukpm7y" path="res://component/entity/ground/ground051.jpg" id="1_3ytcp"]
 [ext_resource type="Script" path="res://run/levels/camera_tracker.gd" id="1_qdm47"]
@@ -26,6 +26,7 @@
 [ext_resource type="PackedScene" uid="uid://dl6fmkdlrcj53" path="res://component/ui/input_prompts/get_in/get_in_prompt.tscn" id="18_bejgn"]
 [ext_resource type="Script" path="res://flow/signal_wire/space_limit.gd" id="19_3qyrt"]
 [ext_resource type="PackedScene" uid="uid://bdtsbgujnsdkt" path="res://component/ui/input_prompts/get_out/get_out_prompt.tscn" id="21_nwcia"]
+[ext_resource type="PackedScene" uid="uid://sogwc56hcxlr" path="res://component/ui/input_prompts/jeep/jeep_prompts.tscn" id="21_wa45u"]
 [ext_resource type="Script" path="res://component/ui/input_prompts/prompt_container.gd" id="22_tmm3q"]
 [ext_resource type="PackedScene" uid="uid://cqkond8xwtdv5" path="res://component/ui/hud/chocolate_gauge/chocolate_gauge.tscn" id="23_wh0jf"]
 
@@ -474,6 +475,9 @@ layout_mode = 2
 visible = false
 layout_mode = 2
 
+[node name="JeepPrompts" parent="UI/InputPromptsCenter/InputPromptsCollection/VehiclePrompts" instance=ExtResource("21_wa45u")]
+layout_mode = 2
+
 [node name="GetOutPrompt" parent="UI/InputPromptsCenter/InputPromptsCollection/VehiclePrompts" instance=ExtResource("21_nwcia")]
 layout_mode = 2
 script = ExtResource("22_tmm3q")