Upload files to 'entities/player'
This commit is contained in:
parent
351c7f37f2
commit
7d15c58990
|
@ -30,10 +30,10 @@ far = 250.0
|
||||||
[node name="Node2D" type="Node2D" parent="."]
|
[node name="Node2D" type="Node2D" parent="."]
|
||||||
|
|
||||||
[node name="HSlider" type="HSlider" parent="Node2D"]
|
[node name="HSlider" type="HSlider" parent="Node2D"]
|
||||||
margin_left = 108.021
|
margin_left = 55.1043
|
||||||
margin_top = 10.4773
|
margin_top = 556.023
|
||||||
margin_right = 460.021
|
margin_right = 407.104
|
||||||
margin_bottom = 43.4773
|
margin_bottom = 589.023
|
||||||
min_value = 15.0
|
min_value = 15.0
|
||||||
max_value = 150.0
|
max_value = 150.0
|
||||||
value = 97.0
|
value = 97.0
|
||||||
|
@ -42,21 +42,46 @@ __meta__ = {
|
||||||
}
|
}
|
||||||
|
|
||||||
[node name="Label" type="Label" parent="Node2D"]
|
[node name="Label" type="Label" parent="Node2D"]
|
||||||
margin_left = 70.7272
|
margin_left = 18.1098
|
||||||
margin_top = 20.9431
|
margin_top = 566.168
|
||||||
margin_right = 125.727
|
margin_right = 73.1096
|
||||||
margin_bottom = 43.9431
|
margin_bottom = 589.168
|
||||||
text = "FOV:"
|
text = "FOV:"
|
||||||
__meta__ = {
|
__meta__ = {
|
||||||
"_edit_use_anchors_": false
|
"_edit_use_anchors_": false
|
||||||
}
|
}
|
||||||
|
|
||||||
[node name="fps_num" type="Label" parent="Node2D"]
|
[node name="fps_num" type="Label" parent="Node2D"]
|
||||||
margin_left = 466.032
|
margin_left = 412.154
|
||||||
margin_top = 20.0198
|
margin_top = 565.536
|
||||||
margin_right = 535.032
|
margin_right = 481.154
|
||||||
margin_bottom = 59.0198
|
margin_bottom = 604.536
|
||||||
text = "placehold"
|
text = "placehold"
|
||||||
__meta__ = {
|
__meta__ = {
|
||||||
"_edit_use_anchors_": false
|
"_edit_use_anchors_": false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[node name="CanvasLayer" type="CanvasLayer" parent="."]
|
||||||
|
pause_mode = 2
|
||||||
|
layer = 50
|
||||||
|
|
||||||
|
[node name="Pause" type="Control" parent="CanvasLayer"]
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
margin_left = -0.920593
|
||||||
|
margin_top = 22.8412
|
||||||
|
margin_right = -0.920593
|
||||||
|
margin_bottom = 5.84125
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_use_anchors_": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="Background" type="ColorRect" parent="CanvasLayer/Pause"]
|
||||||
|
pause_mode = 1
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
margin_top = 558.0
|
||||||
|
color = Color( 0.0627451, 0.0627451, 0.0627451, 0.639216 )
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_use_anchors_": false
|
||||||
|
}
|
||||||
|
|
|
@ -29,6 +29,8 @@ export(int) var jump_height = 10
|
||||||
export(int) var fly_speed = 10
|
export(int) var fly_speed = 10
|
||||||
export(int) var fly_accel = 4
|
export(int) var fly_accel = 4
|
||||||
var flying := false
|
var flying := false
|
||||||
|
# Pause
|
||||||
|
|
||||||
|
|
||||||
##################################################
|
##################################################
|
||||||
|
|
||||||
|
@ -88,6 +90,7 @@ func walk(delta: float) -> void:
|
||||||
# Apply Gravity
|
# Apply Gravity
|
||||||
velocity.y -= gravity * delta
|
velocity.y -= gravity * delta
|
||||||
|
|
||||||
|
|
||||||
# Sprint
|
# Sprint
|
||||||
var _speed: int
|
var _speed: int
|
||||||
if (Input.is_action_pressed("move_sprint") and can_sprint() and move_axis.x >= 0.5):
|
if (Input.is_action_pressed("move_sprint") and can_sprint() and move_axis.x >= 0.5):
|
||||||
|
|
Reference in New Issue