| … | … | @@ -1,6 +1,52 @@ |
| 1 | [gd_scene load_steps=2 format=3 uid="uid://cpk1cfupvkvxd"] | |
| 1 | [gd_scene load_steps=24 format=3 uid="uid://cpk1cfupvkvxd"] | |
| 2 | 2 | |
| 3 | 3 | [ext_resource type="PackedScene" uid="uid://l6vfvdaxveow" path="res://assets/models/tumble/tumble.glb" id="1"] |
| 4 | [ext_resource type="Animation" uid="uid://bhxwd0hc1xwol" path="res://assets/models/tumble/animation/default.res" id="2_fftwx"] | |
| 5 | [ext_resource type="Animation" uid="uid://b641gdt8rlxs0" path="res://assets/models/tumble/animation/idle.res" id="3_lsrbb"] | |
| 6 | [ext_resource type="Animation" uid="uid://3m8jnrrjmb8n" path="res://assets/models/tumble/animation/dive-roll.res" id="4_dyugg"] | |
| 7 | [ext_resource type="Animation" uid="uid://cllf5vh5wfe4m" path="res://assets/models/tumble/animation/jump.res" id="5_ip3n0"] | |
| 8 | [ext_resource type="Animation" uid="uid://diu138rt4wbo4" path="res://assets/models/tumble/animation/wall-grab-f.res" id="6_6isr8"] | |
| 9 | [ext_resource type="Animation" uid="uid://rejlngohxkgr" path="res://assets/models/tumble/animation/wall-grab-l.res" id="7_cwl1d"] | |
| 10 | [ext_resource type="Animation" uid="uid://cjiv1m5iedtef" path="res://assets/models/tumble/animation/wall-grab-r.res" id="8_7jxsl"] | |
| 11 | [ext_resource type="Animation" uid="uid://cetrd58cpnn2x" path="res://assets/models/tumble/animation/walk-diagonal-left.res" id="9_db0e2"] | |
| 12 | [ext_resource type="Animation" uid="uid://dg0td345nrdbe" path="res://assets/models/tumble/animation/run.res" id="10_aoqp7"] | |
| 13 | [ext_resource type="Animation" uid="uid://bkvaodakwug3e" path="res://assets/models/tumble/animation/wall-run-l.res" id="11_5rtrc"] | |
| 14 | [ext_resource type="Animation" uid="uid://4ixqttqa6txu" path="res://assets/models/tumble/animation/wall-run-r.res" id="12_6ldo3"] | |
| 15 | [ext_resource type="Animation" uid="uid://h4f7tog32k57" path="res://assets/models/tumble/animation/walk-backward.res" id="13_s7y2n"] | |
| 16 | [ext_resource type="Animation" uid="uid://b046urodah0a1" path="res://assets/models/tumble/animation/strafe-left.res" id="14_aqw44"] | |
| 17 | [ext_resource type="Animation" uid="uid://brqor25qijknl" path="res://assets/models/tumble/animation/walk-diagonal-right.res" id="15_nkjes"] | |
| 18 | [ext_resource type="Animation" uid="uid://csbbfdgwqo8tq" path="res://assets/models/tumble/animation/falling.res" id="16_2dbet"] | |
| 19 | [ext_resource type="Animation" uid="uid://crlfbbyt7jnwd" path="res://assets/models/tumble/animation/walk-diagonal-left-back.res" id="17_tjos4"] | |
| 20 | [ext_resource type="Animation" uid="uid://b0vglu3hw56jb" path="res://assets/models/tumble/animation/strafe_right.res" id="18_mhyek"] | |
| 21 | [ext_resource type="Animation" uid="uid://cy81owqw5jwgd" path="res://assets/models/tumble/animation/walk-diagonal-right-back.res" id="19_pwmja"] | |
| 22 | [ext_resource type="Animation" uid="uid://beqlu220rgebq" path="res://assets/models/tumble/animation/sprint.res" id="20_0avmt"] | |
| 23 | [ext_resource type="Animation" uid="uid://bbo2efp3p5j45" path="res://assets/models/tumble/animation/landing.res" id="21_e5j8k"] | |
| 24 | [ext_resource type="Animation" uid="uid://cevud8wm6itgs" path="res://assets/models/tumble/animation/walk-forward.res" id="22_lq2ie"] | |
| 25 | ||
| 26 | [sub_resource type="AnimationLibrary" id="AnimationLibrary_yowx3"] | |
| 27 | _data = { | |
| 28 | "default": ExtResource( "2_fftwx" ), | |
| 29 | "dive-roll": ExtResource( "4_dyugg" ), | |
| 30 | "falling": ExtResource( "16_2dbet" ), | |
| 31 | "idle": ExtResource( "3_lsrbb" ), | |
| 32 | "jump": ExtResource( "5_ip3n0" ), | |
| 33 | "landing": ExtResource( "21_e5j8k" ), | |
| 34 | "run": ExtResource( "10_aoqp7" ), | |
| 35 | "sprint": ExtResource( "20_0avmt" ), | |
| 36 | "strafe-left": ExtResource( "14_aqw44" ), | |
| 37 | "strafe-right": ExtResource( "18_mhyek" ), | |
| 38 | "walk-backward": ExtResource( "13_s7y2n" ), | |
| 39 | "walk-diagonal-left": ExtResource( "9_db0e2" ), | |
| 40 | "walk-diagonal-left-back": ExtResource( "17_tjos4" ), | |
| 41 | "walk-diagonal-right": ExtResource( "15_nkjes" ), | |
| 42 | "walk-diagonal-right-back": ExtResource( "19_pwmja" ), | |
| 43 | "walk-forward": ExtResource( "22_lq2ie" ), | |
| 44 | "wall_grab_f": ExtResource( "6_6isr8" ), | |
| 45 | "wall_grab_l": ExtResource( "7_cwl1d" ), | |
| 46 | "wall_grab_r": ExtResource( "8_7jxsl" ), | |
| 47 | "wall_run_l": ExtResource( "11_5rtrc" ), | |
| 48 | "wall_run_r": ExtResource( "12_6ldo3" ) | |
| 49 | } | |
| 4 | 50 | |
| 5 | 51 | [node name="tumble" instance=ExtResource( "1" )] |
| 6 | 52 | transform = Transform3D(0.65, 0, 0, 0, 0.65, 0, 0, 0, 0.65, 0, 0, 0) |
| … | … | @@ -9,3 +55,8 @@ transform = Transform3D(0.65, 0, 0, 0, 0.65, 0, 0, 0, 0.65, 0, 0, 0) |
| 9 | 55 | process_priority = 1 |
| 10 | 56 | root_bone = &"DEF-upper_arm.R" |
| 11 | 57 | tip_bone = &"DEF-hand.R" |
| 58 | ||
| 59 | [node name="AnimationPlayer" parent="." index="1"] | |
| 60 | libraries = { | |
| 61 | "": SubResource( "AnimationLibrary_yowx3" ) | |
| 62 | } |
| … | … | @@ -187,4 +187,4 @@ nodes/walk_scale/node = SubResource( "AnimationNodeTimeScale_ox5by" ) |
| 187 | 187 | nodes/walk_scale/position = Vector2(-640, 360) |
| 188 | 188 | nodes/wall_run/node = SubResource( "AnimationNodeTransition_1e0x1" ) |
| 189 | 189 | nodes/wall_run/position = Vector2(720, -60) |
| 190 | node_connections = [&"output", 0, &"wall_run", &"roll", 0, &"air_transition", &"roll", 1, &"roll_scale", &"Blend2", 0, &"Animation 8", &"Blend2", 1, &"Animation 9", &"Blend2 2", 0, &"Animation 12", &"Blend2 2", 1, &"Animation 10", &"TimeScale 3", 0, &"strafe", &"aim_transition", 0, &"TimeScale 3", &"aim_transition", 1, &"iwr_blend", &"air_blend", 0, &"jump_scale", &"air_blend", 1, &"falling_scale", &"air_blend", 2, &"landing_scale", &"air_transition", 0, &"air_blend", &"air_transition", 1, &"aim_transition", &"falling_scale", 0, &"Animation 7", &"iwr_blend", 0, &"Animation 2", &"iwr_blend", 1, &"walk_scale", &"iwr_blend", 2, &"run_scale", &"jump_scale", 0, &"Animation 6", &"landing_scale", 0, &"Animation 3", &"roll_scale", 0, &"Animation", &"run_scale", 0, &"Animation 5", &"walk_scale", 0, &"Animation 4", &"wall_run", 0, &"Blend2", &"wall_run", 1, &"Blend2 2", &"wall_run", 2, &"roll"] | |
| 190 | node_connections = [&"output", 0, &"wall_run", &"roll", 0, &"air_transition", &"roll", 1, &"roll_scale", &"Blend2", 0, &"Animation 8", &"Blend2", 1, &"Animation 9", &"Blend2 2", 0, &"Animation 12", &"Blend2 2", 1, &"Animation 10", &"falling_scale", 0, &"Animation 7", &"walk_scale", 0, &"Animation 4", &"jump_scale", 0, &"Animation 6", &"air_transition", 0, &"air_blend", &"air_transition", 1, &"aim_transition", &"air_blend", 0, &"jump_scale", &"air_blend", 1, &"falling_scale", &"air_blend", 2, &"landing_scale", &"iwr_blend", 0, &"Animation 2", &"iwr_blend", 1, &"walk_scale", &"iwr_blend", 2, &"run_scale", &"aim_transition", 0, &"TimeScale 3", &"aim_transition", 1, &"iwr_blend", &"roll_scale", 0, &"Animation", &"TimeScale 3", 0, &"strafe", &"landing_scale", 0, &"Animation 3", &"run_scale", 0, &"Animation 5", &"wall_run", 0, &"Blend2", &"wall_run", 1, &"Blend2 2", &"wall_run", 2, &"roll"] |
| … | … | @@ -82,29 +82,26 @@ _data = { |
| 82 | 82 | |
| 83 | 83 | [node name="Skeleton3D" parent="Model/Armature" index="0"] |
| 84 | 84 | bones/0/position = Vector3(0, 0.235168, 0) |
| 85 | bones/1/position = Vector3(-0.029438, 0.0211749, 0.771888) | |
| 86 | bones/1/rotation = Quaternion(0.000375906, 0.565812, 0.824534, 0.00103834) | |
| 87 | bones/2/rotation = Quaternion(0.106818, 1.32386e-05, -0.000146255, 0.994279) | |
| 88 | bones/3/rotation = Quaternion(0.000845101, 0.999184, -0.0400496, -0.00513328) | |
| 85 | bones/1/position = Vector3(0.025113, 0.0234577, 0.751629) | |
| 86 | bones/1/rotation = Quaternion(0.00601547, 0.544154, 0.838964, -0.000462305) | |
| 87 | bones/2/rotation = Quaternion(0.111005, 6.04274e-06, -6.8906e-05, 0.99382) | |
| 88 | bones/3/rotation = Quaternion(0.000393012, 0.999838, -0.0170541, -0.00571777) | |
| 89 | 89 | bones/3/scale = Vector3(1, 1, 1) |
| 90 | bones/4/rotation = Quaternion(0.128212, 0.0050986, -0.000394213, 0.991734) | |
| 91 | bones/5/rotation = Quaternion(-0.000745599, 0.99504, 0.0993588, 0.004815) | |
| 92 | bones/6/rotation = Quaternion(0.0941808, 6.17544e-05, 6.35412e-06, 0.995555) | |
| 93 | bones/7/rotation = Quaternion(0.000696197, 0.991409, 0.130705, 0.00482462) | |
| 94 | bones/8/position = Vector3(0.021036, 0.147294, 0.0929496) | |
| 95 | bones/8/rotation = Quaternion(-0.574533, -0.380402, -0.372139, 0.621867) | |
| 96 | bones/9/rotation = Quaternion(0.037767, 0.752982, -0.615964, 0.228428) | |
| 97 | bones/9/scale = Vector3(1.00607, 0.987783, 1.00607) | |
| 98 | bones/10/rotation = Quaternion(1.48976e-07, -0.126743, -7.47887e-10, 0.991936) | |
| 99 | bones/11/rotation = Quaternion(0.43762, -0.103929, 0.0507368, 0.891692) | |
| 100 | bones/11/scale = Vector3(0.999515, 0.989137, 1.01123) | |
| 101 | bones/12/rotation = Quaternion(9.76345e-07, 0.0887699, -4.90995e-07, 0.996052) | |
| 102 | bones/13/rotation = Quaternion(-0.0705242, 0.0741511, -0.127807, 0.986506) | |
| 103 | bones/13/scale = Vector3(0.994858, 1.01004, 0.995203) | |
| 90 | bones/4/rotation = Quaternion(0.149188, 0.00587571, -0.000327082, 0.988791) | |
| 91 | bones/5/rotation = Quaternion(-0.000394494, 0.995085, 0.0989721, 0.00322795) | |
| 92 | bones/6/rotation = Quaternion(0.093461, 0.000127583, 1.31935e-05, 0.995623) | |
| 93 | bones/7/rotation = Quaternion(0.000435368, 0.990042, 0.140737, 0.00314753) | |
| 94 | bones/8/position = Vector3(0.021036, 0.1424, 0.0949776) | |
| 95 | bones/9/rotation = Quaternion(-0.0487467, 0.725476, -0.660537, 0.187082) | |
| 96 | bones/9/scale = Vector3(1.00213, 0.994925, 1.00213) | |
| 97 | bones/10/rotation = Quaternion(1.13059e-07, -0.131121, -4.37599e-08, 0.991366) | |
| 98 | bones/11/rotation = Quaternion(0.188657, -0.131088, 0.0251646, 0.972929) | |
| 99 | bones/11/scale = Vector3(0.999515, 0.996785, 1.00205) | |
| 100 | bones/12/rotation = Quaternion(8.89895e-07, 0.132137, -5.21194e-07, 0.991231) | |
| 101 | bones/13/rotation = Quaternion(-0.159597, 0.137148, -0.230932, 0.949942) | |
| 102 | bones/13/scale = Vector3(0.998803, 1.0032, 0.996491) | |
| 104 | 103 | bones/16/rotation = Quaternion(-0.00581887, 0.0016982, -0.00528009, 0.999968) |
| 105 | 104 | bones/17/rotation = Quaternion(0.0065653, -0.00667406, 0.0208095, 0.99974) |
| 106 | bones/18/rotation = Quaternion(0.178116, 0.150551, -0.33769, 0.911907) | |
| 107 | bones/18/scale = Vector3(1, 1, 1) | |
| 108 | 105 | bones/19/rotation = Quaternion(-0.148158, 0.0254844, -0.0646288, 0.986521) |
| 109 | 106 | bones/20/rotation = Quaternion(-0.0146405, -0.0187557, 0.0313062, 0.999227) |
| 110 | 107 | bones/23/rotation = Quaternion(-0.0133977, -0.000793498, 0.00273888, 0.999906) |
| … | … | @@ -113,18 +110,17 @@ bones/26/rotation = Quaternion(0.118904, 0.0306709, -0.0560406, 0.990848) |
| 113 | 110 | bones/27/rotation = Quaternion(-0.013392, -0.00270695, 0.00650454, 0.999885) |
| 114 | 111 | bones/28/rotation = Quaternion(0.000326484, -0.00915123, 0.0211577, 0.999734) |
| 115 | 112 | bones/30/rotation = Quaternion(0.119319, -0.0143615, 0.0193321, 0.992564) |
| 116 | bones/31/rotation = Quaternion(-0.0149339, 0.0107445, -0.0181568, 0.999666) | |
| 117 | 113 | bones/32/rotation = Quaternion(0.0224833, -0.00492395, 0.00846113, 0.999699) |
| 118 | bones/33/position = Vector3(-0.0210362, 0.147294, 0.0929496) | |
| 114 | bones/33/position = Vector3(-0.0210363, 0.1424, 0.0949775) | |
| 119 | 115 | bones/33/rotation = Quaternion(-0.574533, 0.380401, 0.372139, 0.621867) |
| 120 | bones/34/rotation = Quaternion(0.177806, 0.761236, -0.598295, -0.175918) | |
| 121 | bones/34/scale = Vector3(1.00592, 0.987462, 1.00592) | |
| 122 | bones/35/rotation = Quaternion(2.38357e-07, 0.110399, 6.66859e-07, 0.993887) | |
| 123 | bones/36/rotation = Quaternion(0.338102, 0.109359, -0.038779, 0.933929) | |
| 124 | bones/36/scale = Vector3(0.999974, 0.993164, 1.00712) | |
| 125 | bones/37/rotation = Quaternion(-3.68039e-07, -0.129643, -1.96955e-07, 0.991561) | |
| 126 | bones/38/rotation = Quaternion(-0.314132, -0.128754, 0.264375, 0.90269) | |
| 127 | bones/38/scale = Vector3(0.99943, 1.00221, 0.998245) | |
| 116 | bones/34/rotation = Quaternion(0.0187844, 0.745717, -0.632811, -0.207613) | |
| 117 | bones/34/scale = Vector3(1.0061, 0.989602, 1.0061) | |
| 118 | bones/35/rotation = Quaternion(2.06824e-07, 0.159876, 6.26255e-07, 0.987137) | |
| 119 | bones/36/rotation = Quaternion(0.410602, 0.150928, -0.0680916, 0.896655) | |
| 120 | bones/36/scale = Vector3(0.999974, 0.98965, 1.01093) | |
| 121 | bones/37/rotation = Quaternion(-3.62793e-07, -0.126973, -2.03234e-07, 0.991906) | |
| 122 | bones/38/rotation = Quaternion(0.0590191, -0.123985, 0.0521213, 0.989155) | |
| 123 | bones/38/scale = Vector3(0.994385, 1.01068, 0.994872) | |
| 128 | 124 | bones/40/rotation = Quaternion(0.152494, -0.0320192, 0.0648275, 0.985656) |
| 129 | 125 | bones/41/rotation = Quaternion(-0.0058182, -0.00169902, 0.00528057, 0.999968) |
| 130 | 126 | bones/42/rotation = Quaternion(0.00656411, 0.00667606, -0.0208096, 0.99974) |
| … | … | @@ -137,30 +133,30 @@ bones/53/rotation = Quaternion(0.000341449, 0.00913482, -0.0211588, 0.999734) |
| 137 | 133 | bones/55/rotation = Quaternion(0.119319, 0.0143618, -0.0193322, 0.992564) |
| 138 | 134 | bones/56/rotation = Quaternion(-0.0149346, -0.0107439, 0.0181571, 0.999666) |
| 139 | 135 | bones/57/rotation = Quaternion(0.0224814, 0.00492577, -0.00846109, 0.999699) |
| 140 | bones/58/position = Vector3(0.177163, -0.0776189, -0.0479095) | |
| 136 | bones/58/position = Vector3(0.177163, -0.0825137, -0.0458816) | |
| 141 | 137 | bones/58/rotation = Quaternion(-3.44743e-07, 0.696936, 0.717133, 3.4553e-07) |
| 142 | bones/59/position = Vector3(-0.177162, -0.0776191, -0.0479098) | |
| 138 | bones/59/position = Vector3(-0.177162, -0.0825137, -0.045882) | |
| 143 | 139 | bones/59/rotation = Quaternion(-3.44744e-07, 0.696936, 0.717133, 3.4553e-07) |
| 144 | bones/60/position = Vector3(2.97301e-07, -0.12535, -0.300986) | |
| 140 | bones/60/position = Vector3(2.95953e-07, -0.130245, -0.298959) | |
| 145 | 141 | bones/60/rotation = Quaternion(0.0142813, -4.9445e-07, 7.0621e-09, 0.999898) |
| 146 | bones/63/rotation = Quaternion(-0.00526412, -0.265308, 0.963798, -0.0260235) | |
| 147 | bones/63/scale = Vector3(1.00972, 0.980523, 1.00972) | |
| 148 | bones/64/rotation = Quaternion(2.83777e-08, -0.0022857, 9.51757e-09, 0.999997) | |
| 149 | bones/65/rotation = Quaternion(0.642537, -0.00283286, 0.00169495, 0.766248) | |
| 150 | bones/65/scale = Vector3(1.00059, 0.976407, 1.0237) | |
| 151 | bones/66/rotation = Quaternion(6.48539e-09, -0.00773406, -9.25361e-08, 0.99997) | |
| 152 | bones/67/rotation = Quaternion(-0.539795, -0.00780617, -0.0250915, 0.841386) | |
| 153 | bones/67/scale = Vector3(0.989649, 1.00553, 1.00526) | |
| 154 | bones/69/rotation = Quaternion(0.0180978, -0.652815, 0.750776, 0.0992007) | |
| 155 | bones/69/scale = Vector3(1.00929, 0.981996, 1.00929) | |
| 156 | bones/70/rotation = Quaternion(-2.86251e-08, 0.0234514, 8.86064e-09, 0.999725) | |
| 157 | bones/71/rotation = Quaternion(0.530914, 0.0231835, -0.0149243, 0.846977) | |
| 158 | bones/71/scale = Vector3(1.00085, 0.975863, 1.02406) | |
| 159 | bones/72/rotation = Quaternion(2.12851e-08, 0.00707667, -2.82736e-08, 0.999975) | |
| 160 | bones/73/rotation = Quaternion(-0.217105, 0.00690931, 0.136129, 0.966585) | |
| 161 | bones/73/scale = Vector3(0.99221, 1.01379, 0.99384) | |
| 162 | ||
| 163 | [node name="SkeletonIK3D" parent="Model/Armature/Skeleton3D" index="2"] | |
| 142 | bones/63/rotation = Quaternion(-0.0170062, -0.665242, 0.740612, -0.0930531) | |
| 143 | bones/63/scale = Vector3(1.0105, 0.980401, 1.0105) | |
| 144 | bones/64/rotation = Quaternion(9.34075e-09, -0.0226591, 3.82375e-09, 0.999743) | |
| 145 | bones/65/rotation = Quaternion(0.597031, -0.0250195, 0.0191747, 0.801599) | |
| 146 | bones/65/scale = Vector3(1.00123, 0.972417, 1.02762) | |
| 147 | bones/66/rotation = Quaternion(4.20902e-08, -0.00772438, -8.95655e-08, 0.99997) | |
| 148 | bones/67/rotation = Quaternion(-0.270103, -0.0101397, -0.135793, 0.953154) | |
| 149 | bones/67/scale = Vector3(0.98977, 1.01083, 0.998584) | |
| 150 | bones/69/rotation = Quaternion(-0.00114081, -0.446921, 0.894516, -0.0100913) | |
| 151 | bones/69/scale = Vector3(1.01298, 0.97375, 1.01298) | |
| 152 | bones/70/rotation = Quaternion(4.97867e-08, -0.000935263, -6.22435e-09, 1) | |
| 153 | bones/71/rotation = Quaternion(0.761278, -0.00241582, 0.00298629, 0.648415) | |
| 154 | bones/71/scale = Vector3(1.00085, 0.970321, 1.0297) | |
| 155 | bones/72/rotation = Quaternion(4.2561e-08, -0.00532523, -1.17982e-08, 0.999986) | |
| 156 | bones/73/rotation = Quaternion(0.0133263, -0.0051952, -0.00348867, 0.999892) | |
| 157 | bones/73/scale = Vector3(0.985484, 1.02391, 0.991301) | |
| 158 | ||
| 159 | [node name="SkeletonIK3D" parent="Model/Armature/Skeleton3D" index="1"] | |
| 164 | 160 | target_node = NodePath("../../../../GrapplingHook/IKTarget") |
| 165 | 161 | |
| 166 | 162 | [node name="AnimationPlayer" parent="Model" index="1"] |
| … | … | @@ -18,8 +18,9 @@ var previousInputDirection : Vector3 = Vector3.ZERO |
| 18 | 18 | var mouseMovementChanged : bool = false |
| 19 | 19 | |
| 20 | 20 | func _ready(): |
| 21 | Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED) | |
| 21 | # Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED) | |
| 22 | 22 | # clippedCamera.add_exception(get_parent()) |
| 23 | pass | |
| 23 | 24 | |
| 24 | 25 | func _process(_delta): |
| 25 | 26 | var inputDirection : Vector3 = Vector3.ZERO |
| … | … | @@ -2,21 +2,35 @@ extends Node |
| 2 | 2 | |
| 3 | 3 | var bDebugPaused : bool = false |
| 4 | 4 | var mouseModeBackup |
| 5 | var UINode = null | |
| 5 | 6 | |
| 6 | 7 | func _ready(): |
| 7 | 8 | bDebugPaused = false |
| 8 | 9 | get_tree().paused = false |
| 9 | 10 | mouseModeBackup = Input.get_mouse_mode() |
| 10 | 11 | |
| 12 | func CheckAndUpdateUINode(): | |
| 13 | if(UINode == null): | |
| 14 | UINode = get_tree().get_current_scene().get_node("UI").get_node("Menu_Main") | |
| 15 | ||
| 16 | func HandleMouseToggle(): | |
| 17 | if Input.get_mouse_mode() != Input.MOUSE_MODE_VISIBLE: | |
| 18 | mouseModeBackup = Input.get_mouse_mode() | |
| 19 | Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE) | |
| 20 | else: | |
| 21 | Input.set_mouse_mode(mouseModeBackup) | |
| 22 | ||
| 11 | 23 | func _input(_event): |
| 12 | 24 | if Input.is_action_just_pressed("ui_cancel"): |
| 13 | get_tree().quit() | |
| 14 | if Input.is_action_just_pressed("toggleMouse"): | |
| 15 | if Input.get_mouse_mode() != Input.MOUSE_MODE_VISIBLE: | |
| 16 | mouseModeBackup = Input.get_mouse_mode() | |
| 17 | Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE) | |
| 25 | # Toggle UI | |
| 26 | CheckAndUpdateUINode() | |
| 27 | if(UINode._getIsMenuShowing() ): | |
| 28 | UINode.hideUI() | |
| 18 | 29 | else: |
| 19 | Input.set_mouse_mode(mouseModeBackup) | |
| 30 | UINode.resetUI() | |
| 31 | UINode.showUI() | |
| 32 | if Input.is_action_just_pressed("toggleMouse"): | |
| 33 | HandleMouseToggle() | |
| 20 | 34 | |
| 21 | 35 | func _process(_delta): |
| 22 | 36 | pass |
| … | … | @@ -2,11 +2,11 @@ extends Control |
| 2 | 2 | |
| 3 | 3 | signal gossip_update_rate_changed(seconds) |
| 4 | 4 | |
| 5 | @onready var lGossipUpdateRate : Label = $HypercoreDebugPanel/HypercoreDebugContainer/GossipUpdateRate | |
| 6 | @onready var gatewayStartStopButton : Button = $HypercoreDebugPanel/HypercoreDebugContainer/GatewayStartStopButton | |
| 7 | @onready var gatewayStatus : Label = $HypercoreDebugPanel/HypercoreDebugContainer/GatewayStatus_Value | |
| 8 | @onready var gossipURL : Label = $HypercoreDebugPanel/HypercoreDebugContainer/GossipURL_Value | |
| 9 | @onready var gossipIDList : ItemList = $HypercoreDebugPanel/HypercoreDebugContainer/GossipIDList_Value | |
| 5 | @onready var lGossipUpdateRate : Label = $HypercoreDebugContainer/GossipUpdateRate | |
| 6 | @onready var gatewayStartStopButton : Button = $HypercoreDebugContainer/GatewayStartStopButton | |
| 7 | @onready var gatewayStatus : Label = $HypercoreDebugContainer/GatewayStatus_Value | |
| 8 | @onready var gossipURL : Label = $HypercoreDebugContainer/GossipURL_Value | |
| 9 | @onready var gossipIDList : ItemList = $HypercoreDebugContainer/GossipIDList_Value | |
| 10 | 10 | |
| 11 | 11 | var hyperGateway : HyperGateway |
| 12 | 12 | var hyperGossip : HyperGossip |
| … | … | @@ -176,6 +176,9 @@ func _get_extension_url(): |
| 176 | 176 | |
| 177 | 177 | func _get_extension_listen_url(): |
| 178 | 178 | return url + '$/extensions/' |
| 179 | ||
| 180 | func _get_url() -> String: | |
| 181 | return url | |
| 179 | 182 | |
| 180 | 183 | func _make_id(): |
| 181 | 184 | return str(randi()) + str(randi()) |
| … | … | @@ -1,8 +1,9 @@ |
| 1 | [gd_scene load_steps=10 format=3 uid="uid://bktxghmjd4nc"] | |
| 1 | [gd_scene load_steps=11 format=3 uid="uid://bktxghmjd4nc"] | |
| 2 | 2 | |
| 3 | 3 | [ext_resource type="PackedScene" uid="uid://njxw8k8p0stp" path="res://game/maps/map_test/map_test.tscn" id="1_0op02"] |
| 4 | 4 | [ext_resource type="Script" path="res://main.gd" id="1_ommes"] |
| 5 | 5 | [ext_resource type="PackedScene" uid="uid://bnmqs28j8wtp1" path="res://game/maps/map_cyber/map_cyber.tscn" id="2_7tyrq"] |
| 6 | [ext_resource type="PackedScene" uid="uid://baa3il80357c5" path="res://menu/main/menu_main.scn" id="2_lst2q"] | |
| 6 | 7 | [ext_resource type="PackedScene" uid="uid://ds36d5iqtsvuh" path="res://game/player/player_core_local.tscn" id="2_yvl7a"] |
| 7 | 8 | [ext_resource type="Script" path="res://hypergodot/hyper_gossip/hyper_gossip.gd" id="3_g8xkj"] |
| 8 | 9 | [ext_resource type="Script" path="res://hypergodot/hyper_godot_core.gd" id="3_hnq10"] |
| … | … | @@ -13,6 +14,10 @@ |
| 13 | 14 | [node name="Main" type="Node"] |
| 14 | 15 | script = ExtResource( "1_ommes" ) |
| 15 | 16 | |
| 17 | [node name="UI" type="Node" parent="."] | |
| 18 | ||
| 19 | [node name="Menu_Main" parent="UI" instance=ExtResource( "2_lst2q" )] | |
| 20 | ||
| 16 | 21 | [node name="Maps" type="Node3D" parent="."] |
| 17 | 22 | |
| 18 | 23 | [node name="map_test" parent="Maps" instance=ExtResource( "1_0op02" )] |
| … | … | @@ -49,6 +49,10 @@ run/main_scene="res://main.tscn" |
| 49 | 49 | config/icon="res://icon.png" |
| 50 | 50 | config/features=PackedStringArray("4.0", "Vulkan Clustered") |
| 51 | 51 | |
| 52 | [autoload] | |
| 53 | ||
| 54 | Settings="*res://game/settings.gd" | |
| 55 | ||
| 52 | 56 | [display] |
| 53 | 57 | |
| 54 | 58 | window/size/viewport_width=1440 |