Files
MovementTests/guide_examples/input_contexts/input_contexts.tscn
Minimata af1f6da98d
Some checks failed
Create tag and build when new code gets to main / BumpTag (push) Successful in 31s
Create tag and build when new code gets to main / Test (push) Has been cancelled
Create tag and build when new code gets to main / Export (push) Has been cancelled
updating project files
2026-01-28 09:50:10 +01:00

196 lines
8.4 KiB
Plaintext

[gd_scene format=3 uid="uid://b6h4wnjfjs70m"]
[ext_resource type="Script" uid="uid://bkggahcvec2hd" path="res://guide_examples/input_contexts/boat.gd" id="1_61cdj"]
[ext_resource type="Script" uid="uid://cnf3xx5jxiu8q" path="res://guide_examples/input_contexts/input_contexts.gd" id="1_386pq"]
[ext_resource type="Texture2D" uid="uid://byjxtsekdl8t2" path="res://guide_examples/shared/godot_logo.svg" id="1_x61i0"]
[ext_resource type="Texture2D" uid="uid://cyqlk5nkvswx7" path="res://guide_examples/input_contexts/boat.svg" id="1_yfaid"]
[ext_resource type="Resource" uid="uid://bv3t73wg3atf7" path="res://guide_examples/input_contexts/mapping_contexts/boat_context.tres" id="2_ha2ml"]
[ext_resource type="Resource" uid="uid://5jercxe6t3go" path="res://guide_examples/input_contexts/mapping_contexts/boat_actions/accelerate.tres" id="3_8s4br"]
[ext_resource type="Script" uid="uid://bc00xf6yb6mw0" path="res://guide_examples/input_contexts/player.gd" id="3_kn2qk"]
[ext_resource type="Resource" uid="uid://cplpvxhus6bwb" path="res://guide_examples/input_contexts/mapping_contexts/player_context.tres" id="4_3xwjv"]
[ext_resource type="Resource" uid="uid://qsysw0ljlj0l" path="res://guide_examples/input_contexts/mapping_contexts/boat_actions/turn.tres" id="4_w1gps"]
[ext_resource type="Resource" uid="uid://cnaj42xnfcibo" path="res://guide_examples/input_contexts/mapping_contexts/player_actions/move.tres" id="5_70jqj"]
[ext_resource type="Resource" uid="uid://bk2j1ww7iwqd0" path="res://guide_examples/input_contexts/mapping_contexts/boat_actions/leave.tres" id="5_typxl"]
[ext_resource type="Resource" uid="uid://crjkk2edn8g8k" path="res://guide_examples/input_contexts/mapping_contexts/player_actions/use.tres" id="6_aiqns"]
[ext_resource type="PackedScene" uid="uid://dkr80d2pi0d41" path="res://addons/guide/debugger/guide_debugger.tscn" id="12_jcoq7"]
[ext_resource type="Theme" uid="uid://dot0gi1yoqmrl" path="res://guide_examples/shared/ui_theme.tres" id="12_u0g3a"]
[ext_resource type="Script" uid="uid://w8q1xlqw60qh" path="res://guide_examples/shared/instructions_label.gd" id="14_ui0u7"]
[ext_resource type="Script" uid="uid://cluhc11vixkf1" path="res://addons/guide/guide_action.gd" id="15_5e81o"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_w57h4"]
size = Vector2(1972, 59)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_r5hqg"]
size = Vector2(59, 1161)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_ifvju"]
size = Vector2(2030.5, 60.5)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_qarqo"]
size = Vector2(102, 1160.5)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_la1oy"]
size = Vector2(446.5, 1141)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_3q8sb"]
size = Vector2(368, 148)
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_54ta5"]
radius = 75.0
height = 252.0
[sub_resource type="RectangleShape2D" id="RectangleShape2D_3lf7l"]
size = Vector2(126, 130)
[sub_resource type="CircleShape2D" id="CircleShape2D_dt2nf"]
radius = 141.891
[node name="InputContexts" type="Node2D" unique_id=1380224864]
script = ExtResource("1_386pq")
starting_context = ExtResource("4_3xwjv")
[node name="World" type="Node2D" parent="." unique_id=1410349708]
[node name="Sea" type="ColorRect" parent="World" unique_id=2083337272]
offset_right = 2009.0
offset_bottom = 1129.0
color = Color(0.0440738, 0.000205037, 0.549847, 1)
metadata/_edit_lock_ = true
[node name="Land" type="Polygon2D" parent="World" unique_id=1807479761]
color = Color(0.336331, 0.394587, 0.063959, 1)
polygon = PackedVector2Array(55, -51, 259, -24, 398, 124, 356, 225, 279, 461, 394, 656, 412, 865, 342, 1085, -15, 1119, -22, -67)
metadata/_edit_lock_ = true
[node name="Jetty" type="ColorRect" parent="World/Land" unique_id=836391108]
offset_left = 283.0
offset_top = 144.0
offset_right = 641.0
offset_bottom = 280.0
color = Color(0.243329, 0.15798, 7.21961e-08, 1)
[node name="World Boundaries" type="StaticBody2D" parent="World" unique_id=1281217116]
[node name="CollisionShape2D" type="CollisionShape2D" parent="World/World Boundaries" unique_id=1463809221]
position = Vector2(976, -19.5)
shape = SubResource("RectangleShape2D_w57h4")
[node name="CollisionShape2D2" type="CollisionShape2D" parent="World/World Boundaries" unique_id=1770003690]
position = Vector2(-10, 532)
shape = SubResource("RectangleShape2D_r5hqg")
[node name="CollisionShape2D3" type="CollisionShape2D" parent="World/World Boundaries" unique_id=260645404]
position = Vector2(975.75, 1082.25)
shape = SubResource("RectangleShape2D_ifvju")
[node name="CollisionShape2D4" type="CollisionShape2D" parent="World/World Boundaries" unique_id=906703420]
position = Vector2(1940, 532.25)
shape = SubResource("RectangleShape2D_qarqo")
[node name="NoBoatZone" type="StaticBody2D" parent="World" unique_id=2068643028]
collision_layer = 2
collision_mask = 0
[node name="CollisionShape2D" type="CollisionShape2D" parent="World/NoBoatZone" unique_id=752792412]
position = Vector2(210.75, 556.5)
shape = SubResource("RectangleShape2D_la1oy")
[node name="CollisionShape2D2" type="CollisionShape2D" parent="World/NoBoatZone" unique_id=807118015]
position = Vector2(454, 211)
shape = SubResource("RectangleShape2D_3q8sb")
[node name="Boat" type="CharacterBody2D" parent="." unique_id=2023456304]
position = Vector2(744, 269)
rotation = -1.44336
collision_layer = 5
collision_mask = 3
script = ExtResource("1_61cdj")
speed = 500.0
context = ExtResource("2_ha2ml")
accelerate = ExtResource("3_8s4br")
turn = ExtResource("4_w1gps")
leave = ExtResource("5_typxl")
[node name="Boat" type="Sprite2D" parent="Boat" unique_id=1088489882]
texture = ExtResource("1_yfaid")
[node name="CollisionShape2D" type="CollisionShape2D" parent="Boat" unique_id=969354228]
position = Vector2(-13, 0)
rotation = -1.57573
shape = SubResource("CapsuleShape2D_54ta5")
[node name="PlayerSpot" type="Node2D" parent="Boat" unique_id=1154040108]
unique_name_in_owner = true
rotation = 1.5708
scale = Vector2(0.8, 0.8)
[node name="ExitSpot" type="Marker2D" parent="Boat" unique_id=824134771]
unique_name_in_owner = true
position = Vector2(-11.0732, -212.314)
[node name="Player" type="CharacterBody2D" parent="." unique_id=748697917]
position = Vector2(205, 212)
script = ExtResource("3_kn2qk")
context = ExtResource("4_3xwjv")
move = ExtResource("5_70jqj")
use = ExtResource("6_aiqns")
[node name="Icon" type="Sprite2D" parent="Player" unique_id=1434361692]
texture = ExtResource("1_x61i0")
[node name="CollisionShape" type="CollisionShape2D" parent="Player" unique_id=712351463]
unique_name_in_owner = true
position = Vector2(-1, 1)
shape = SubResource("RectangleShape2D_3lf7l")
[node name="DetectionArea" type="Area2D" parent="Player" unique_id=1988797048]
unique_name_in_owner = true
collision_layer = 0
collision_mask = 4
[node name="CollisionShape2D" type="CollisionShape2D" parent="Player/DetectionArea" unique_id=968801461]
shape = SubResource("CircleShape2D_dt2nf")
[node name="UILayer" type="CanvasLayer" parent="." unique_id=165871456]
[node name="Label" type="Label" parent="UILayer" unique_id=1486503861]
offset_left = 894.0
offset_top = 24.0
offset_right = 1872.0
offset_bottom = 132.0
theme = ExtResource("12_u0g3a")
text = "This demonstrates the use of multiple mapping contexts. We have one for the player
and one for the boat. When the player enters the boat, the boat mappings will
become active and will become inactive once the player leaves. "
[node name="BoatInstructions" type="RichTextLabel" parent="UILayer" unique_id=1737312923]
offset_left = 1316.0
offset_top = 772.0
offset_right = 1356.0
offset_bottom = 812.0
theme = ExtResource("12_u0g3a")
script = ExtResource("14_ui0u7")
instructions_text = "%s to accelerate/break.
%s to turn the boat.
%s to leave the boat."
actions = Array[ExtResource("15_5e81o")]([ExtResource("3_8s4br"), ExtResource("4_w1gps"), ExtResource("5_typxl")])
limit_to_context = ExtResource("2_ha2ml")
[node name="PlayerInstructions" type="RichTextLabel" parent="UILayer" unique_id=1910215489]
offset_left = 1316.0
offset_top = 772.0
offset_right = 1356.0
offset_bottom = 812.0
theme = ExtResource("12_u0g3a")
script = ExtResource("14_ui0u7")
instructions_text = "%s to move.
%s to enter the boat.
"
actions = Array[ExtResource("15_5e81o")]([ExtResource("5_70jqj"), ExtResource("6_aiqns")])
limit_to_context = ExtResource("4_3xwjv")
[node name="DebugLayer" type="CanvasLayer" parent="." unique_id=575034286]
[node name="GuideDebugger" parent="DebugLayer" unique_id=2083125307 instance=ExtResource("12_jcoq7")]
theme = ExtResource("12_u0g3a")