ajout de la possibilite de cache le personnage.

This commit is contained in:
osquallo 2018-07-25 11:56:37 +02:00
parent b9bc33c263
commit e8d4f86f46
5 changed files with 33 additions and 7 deletions

View file

@ -63,6 +63,8 @@ fly_up=[ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":""
]
fly_down=[ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777353,"unicode":0,"echo":false,"script":null)
]
hide_char=[ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777246,"unicode":0,"echo":false,"script":null)
]
[locale]

View file

@ -4,8 +4,8 @@ extends MarginContainer
# var a = 2
# var b = "textvar"
const ACTION_LIST = [ "ui_debug_window", "ui_music_controls", "move_up", "move_down", "move_left", "move_right", "game_flashlight", "ui_pause", "ui_reload", "ui_free_cursor", "ui_quit" ]
const ACTION_TEXT = [ "show/hide debug", "show/hide music", "move up", "move down", "move left", "move right", "on/off flashlight", "pause/play", "reload the scene", "free/capture mouse cursor", "quit" ]
const ACTION_LIST = [ "ui_debug_window", "ui_music_controls", "hide_char", "move_up", "move_down", "move_left", "move_right", "fly_up", "fly_down","game_flashlight", "ui_pause", "ui_reload", "ui_free_cursor", "ui_quit" ]
const ACTION_TEXT = [ "show/hide debug", "show/hide music", "Hide/show character", "move up", "move down", "move left", "move right", "fly up", "fly down", "on/off flashlight", "pause/play", "reload the scene", "free/capture mouse cursor", "quit" ]
func _ready():
# Called every time the node is added to the scene.

View file

@ -3,8 +3,6 @@
[ext_resource path="res://scenes/GUI/Help/Help.gd" type="Script" id=1]
[ext_resource path="res://scenes/GUI/Help/FPS.gd" type="Script" id=2]
[sub_resource type="Gradient" id=1]
offsets = PoolRealArray( 0, 1 )
@ -16,7 +14,7 @@ flags = 4
gradient = SubResource( 1 )
width = 2048
[node name="Help" type="MarginContainer"]
[node name="Help" type="MarginContainer" index="0"]
anchor_left = 0.0
anchor_top = 0.0
@ -148,7 +146,7 @@ mouse_filter = 2
mouse_default_cursor_shape = 0
size_flags_horizontal = 1
size_flags_vertical = 4
text = "Default key binding:"
text = "key binding:"
percent_visible = 1.0
lines_skipped = 0
max_lines_visible = -1

View file

@ -148,7 +148,7 @@ use_filter = false
font_data = ExtResource( 2 )
_sections_unfolded = [ "Font", "Settings" ]
[node name="Settings" type="MarginContainer" index="0"]
[node name="Settings" type="MarginContainer"]
anchor_left = 0.0
anchor_top = 0.0
@ -719,6 +719,29 @@ action_name = "game_flashlight"
description = "Active/désactive la lampe torche."
config_file = "user://input.cfg"
[node name="hide_char" type="HBoxContainer" parent="Menus/TabContainer/Controles/ScrollContainer/TabContainer/Jeu" index="1"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_right = 1022.0
margin_bottom = 44.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 1
mouse_default_cursor_shape = 0
size_flags_horizontal = 1
size_flags_vertical = 1
alignment = 0
script = ExtResource( 3 )
__meta__ = {
"_editor_icon": ExtResource( 4 )
}
action_name = "hide_char"
description = "Affiche/cache le personnage."
config_file = "user://input.cfg"
[node name="Interface" type="VBoxContainer" parent="Menus/TabContainer/Controles/ScrollContainer/TabContainer" index="1"]
editor/display_folded = true

View file

@ -55,6 +55,9 @@ func process_input(delta):
else:
vel.y = 0
if Input.is_action_pressed( "hide_char" ):
$MeshInstance.visible = not $MeshInstance.visible
func process_movement(delta):
dir.y = 0