OverviewFilesCommitsIssuesDocsReleasesPeers

hyper-tps_demo commits / 8e343db

menu added
8e343db78ea16324390c553333f1d8ae6e041c37
by Dresk Spidflisk <dreskspidflisk@gmail.com> · 2022-04-27T15:56:36.000Z

Changed files (6) +36 -9

game/player/player_core_local.tscn +1 -0
……@@ -45,6 +45,7 @@ fov = 90.0
4545far = 8192.0
4646
4747[node name="PlayerDebugUI" parent="." index="7" instance=ExtResource( 5 )]
48visible = false
4849
4950[node name="GrappleVisualPoint_1" parent="GrapplingHook" index="1" instance=ExtResource( 4 )]
5051
game/player/player_core_local_input.gd +1 -1
……@@ -18,7 +18,7 @@ var previousInputDirection : Vector3 = Vector3.ZERO
1818var mouseMovementChanged : bool = false
1919
2020func _ready():
21 Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
21 # Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
2222 clippedCamera.add_exception(get_parent())
2323
2424func _process(_delta):
game/player/player_core_local_input_special.gd +21 -6
……@@ -2,21 +2,36 @@ extends Node
22
33var bDebugPaused : bool = false
44var mouseModeBackup
5var UINode = null
56
67func _ready():
78 bDebugPaused = false
89 get_tree().paused = false
910 mouseModeBackup = Input.get_mouse_mode()
1011
12func CheckAndUpdateUINode():
13 if(UINode == null):
14 UINode = get_tree().get_current_scene().find_node("Menu_Main")
15
16func 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
1123func _input(_event):
1224 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()
1829 else:
19 Input.set_mouse_mode(mouseModeBackup)
30 UINode.resetUI()
31 UINode.showUI()
32 if Input.is_action_just_pressed("toggleMouse"):
33 # HandleMouseToggle()
34 return
2035 if Input.is_action_just_pressed("toggle_slowmo"):
2136 if Engine.get_time_scale() < 1.0:
2237 Engine.set_time_scale(1.0)
game/player/player_local_core.tres +1 -1
……@@ -187,4 +187,4 @@ nodes/walk_scale/node = SubResource( 23 )
187187nodes/walk_scale/position = Vector2( -640, 360 )
188188nodes/wall_run/node = SubResource( 50 )
189189nodes/wall_run/position = Vector2( 720, -60 )
190node_connections = [ "output", 0, "wall_run", "Blend2", 0, "Animation 8", "Blend2", 1, "Animation 9", "air_transition", 0, "air_blend", "air_transition", 1, "aim_transition", "falling_scale", 0, "Animation 6", "run_scale", 0, "Animation 4", "roll_scale", 0, "Animation", "roll", 0, "air_transition", "roll", 1, "roll_scale", "walk_scale", 0, "Animation 3", "landing_scale", 0, "Animation 7", "iwr_blend", 0, "Animation 2", "iwr_blend", 1, "walk_scale", "iwr_blend", 2, "run_scale", "wall_run", 0, "Blend2", "wall_run", 1, "Blend2 2", "wall_run", 2, "roll", "air_blend", 0, "jump_scale", "air_blend", 1, "falling_scale", "air_blend", 2, "landing_scale", "TimeScale 3", 0, "strafe", "Blend2 2", 0, "Animation 11", "Blend2 2", 1, "Animation 10", "aim_transition", 0, "TimeScale 3", "aim_transition", 1, "iwr_blend", "jump_scale", 0, "jump" ]
190node_connections = [ "output", 0, "wall_run", "Blend2", 0, "Animation 8", "Blend2", 1, "Animation 9", "air_blend", 0, "jump_scale", "air_blend", 1, "falling_scale", "air_blend", 2, "landing_scale", "TimeScale 3", 0, "strafe", "falling_scale", 0, "Animation 6", "Blend2 2", 0, "Animation 11", "Blend2 2", 1, "Animation 10", "jump_scale", 0, "jump", "aim_transition", 0, "TimeScale 3", "aim_transition", 1, "iwr_blend", "air_transition", 0, "air_blend", "air_transition", 1, "aim_transition", "iwr_blend", 0, "Animation 2", "iwr_blend", 1, "walk_scale", "iwr_blend", 2, "run_scale", "landing_scale", 0, "Animation 7", "roll", 0, "air_transition", "roll", 1, "roll_scale", "roll_scale", 0, "Animation", "run_scale", 0, "Animation 4", "walk_scale", 0, "Animation 3", "wall_run", 0, "Blend2", "wall_run", 1, "Blend2 2", "wall_run", 2, "roll" ]
main.tscn +7 -1
……@@ -1,4 +1,4 @@
1[gd_scene load_steps=10 format=2]
1[gd_scene load_steps=11 format=2]
22
33[ext_resource path="res://game/maps/map_test/map_test.tscn" type="PackedScene" id=1]
44[ext_resource path="res://game/player/player_core_local.tscn" type="PackedScene" id=2]
……@@ -9,10 +9,15 @@
99[ext_resource path="res://main.gd" type="Script" id=7]
1010[ext_resource path="res://game/maps/map_cyber1/map_cyber1.scn" type="PackedScene" id=8]
1111[ext_resource path="res://game/maps/map_cyber/map_cyber.tscn" type="PackedScene" id=9]
12[ext_resource path="res://menu/main/menu_main.scn" type="PackedScene" id=10]
1213
1314[node name="Main" type="Node"]
1415script = ExtResource( 7 )
1516
17[node name="UI" type="Node" parent="."]
18
19[node name="Menu_Main" parent="UI" instance=ExtResource( 10 )]
20
1621[node name="Maps" type="Node" parent="."]
1722
1823[node name="map_test" parent="Maps" instance=ExtResource( 1 )]
……@@ -39,6 +44,7 @@ script = ExtResource( 4 )
3944script = ExtResource( 3 )
4045
4146[node name="HyperDebugUI" parent="HyperGodot" instance=ExtResource( 5 )]
47visible = false
4248
4349[node name="LocalSnapshotTimer" type="Timer" parent="HyperGodot"]
4450autostart = true
project.godot +5 -0
……@@ -108,6 +108,10 @@ config/name="Godot TPS Demo"
108108run/main_scene="res://main.tscn"
109109config/icon="res://icon.png"
110110
111[autoload]
112
113Settings="*res://game/settings.gd"
114
111115[display]
112116
113117window/size/width=1440
……@@ -178,4 +182,5 @@ common/enable_pause_aware_picking=true
178182
179183[rendering]
180184
185quality/shadows/filter_mode=2
181186environment/default_environment="res://default_env.tres"