| … | … | @@ -45,6 +45,7 @@ fov = 90.0 |
| 45 | 45 | far = 8192.0 |
| 46 | 46 | |
| 47 | 47 | [node name="PlayerDebugUI" parent="." index="7" instance=ExtResource( 5 )] |
| 48 | visible = false | |
| 48 | 49 | |
| 49 | 50 | [node name="GrappleVisualPoint_1" parent="GrapplingHook" index="1" instance=ExtResource( 4 )] |
| 50 | 51 |
| … | … | @@ -18,7 +18,7 @@ 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 | 23 | |
| 24 | 24 | func _process(_delta): |
| … | … | @@ -2,21 +2,36 @@ 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().find_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() | |
| 34 | return | |
| 20 | 35 | if Input.is_action_just_pressed("toggle_slowmo"): |
| 21 | 36 | if Engine.get_time_scale() < 1.0: |
| 22 | 37 | Engine.set_time_scale(1.0) |
| … | … | @@ -187,4 +187,4 @@ nodes/walk_scale/node = SubResource( 23 ) |
| 187 | 187 | nodes/walk_scale/position = Vector2( -640, 360 ) |
| 188 | 188 | nodes/wall_run/node = SubResource( 50 ) |
| 189 | 189 | nodes/wall_run/position = Vector2( 720, -60 ) |
| 190 | node_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" ] | |
| 190 | node_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" ] |
| … | … | @@ -1,4 +1,4 @@ |
| 1 | [gd_scene load_steps=10 format=2] | |
| 1 | [gd_scene load_steps=11 format=2] | |
| 2 | 2 | |
| 3 | 3 | [ext_resource path="res://game/maps/map_test/map_test.tscn" type="PackedScene" id=1] |
| 4 | 4 | [ext_resource path="res://game/player/player_core_local.tscn" type="PackedScene" id=2] |
| … | … | @@ -9,10 +9,15 @@ |
| 9 | 9 | [ext_resource path="res://main.gd" type="Script" id=7] |
| 10 | 10 | [ext_resource path="res://game/maps/map_cyber1/map_cyber1.scn" type="PackedScene" id=8] |
| 11 | 11 | [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] | |
| 12 | 13 | |
| 13 | 14 | [node name="Main" type="Node"] |
| 14 | 15 | script = ExtResource( 7 ) |
| 15 | 16 | |
| 17 | [node name="UI" type="Node" parent="."] | |
| 18 | ||
| 19 | [node name="Menu_Main" parent="UI" instance=ExtResource( 10 )] | |
| 20 | ||
| 16 | 21 | [node name="Maps" type="Node" parent="."] |
| 17 | 22 | |
| 18 | 23 | [node name="map_test" parent="Maps" instance=ExtResource( 1 )] |
| … | … | @@ -39,6 +44,7 @@ script = ExtResource( 4 ) |
| 39 | 44 | script = ExtResource( 3 ) |
| 40 | 45 | |
| 41 | 46 | [node name="HyperDebugUI" parent="HyperGodot" instance=ExtResource( 5 )] |
| 47 | visible = false | |
| 42 | 48 | |
| 43 | 49 | [node name="LocalSnapshotTimer" type="Timer" parent="HyperGodot"] |
| 44 | 50 | autostart = true |
| … | … | @@ -108,6 +108,10 @@ config/name="Godot TPS Demo" |
| 108 | 108 | run/main_scene="res://main.tscn" |
| 109 | 109 | config/icon="res://icon.png" |
| 110 | 110 | |
| 111 | [autoload] | |
| 112 | ||
| 113 | Settings="*res://game/settings.gd" | |
| 114 | ||
| 111 | 115 | [display] |
| 112 | 116 | |
| 113 | 117 | window/size/width=1440 |
| … | … | @@ -178,4 +182,5 @@ common/enable_pause_aware_picking=true |
| 178 | 182 | |
| 179 | 183 | [rendering] |
| 180 | 184 | |
| 185 | quality/shadows/filter_mode=2 | |
| 181 | 186 | environment/default_environment="res://default_env.tres" |