mirror of
https://github.com/Steffo99/pineapple-surf.git
synced 2024-11-22 07:44:20 +00:00
👩🏻🔧 Add missing input actions
This commit is contained in:
parent
153d3106cc
commit
8548859dde
5 changed files with 51 additions and 65 deletions
|
@ -10,7 +10,7 @@ script/source = "extends Node3D
|
||||||
|
|
||||||
# Called when the node enters the scene tree for the first time.
|
# Called when the node enters the scene tree for the first time.
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
$Island.get_active_material(0).set(\"texture_filter\", BaseMaterial3D.TextureFilter.TEXTURE_FILTER_NEAREST)
|
$Island.get_active_material(0).texture_filter = BaseMaterial3D.TextureFilter.TEXTURE_FILTER_NEAREST
|
||||||
|
|
||||||
|
|
||||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
[gd_scene load_steps=4 format=3 uid="uid://bufi0wh54u5x5"]
|
[gd_scene load_steps=5 format=3 uid="uid://bufi0wh54u5x5"]
|
||||||
|
|
||||||
[ext_resource type="Theme" uid="uid://c5a1nyqumj46j" path="res://menu/menu_theme.tres" id="1_mkxnc"]
|
[ext_resource type="Theme" uid="uid://c5a1nyqumj46j" path="res://menu/menu_theme.tres" id="1_mkxnc"]
|
||||||
[ext_resource type="Script" path="res://menu/Menu.gd" id="2_6amk3"]
|
[ext_resource type="Script" path="res://menu/Menu.gd" id="2_6amk3"]
|
||||||
|
@ -36,7 +36,6 @@ theme = ExtResource("1_mkxnc")
|
||||||
script = ExtResource("2_6amk3")
|
script = ExtResource("2_6amk3")
|
||||||
|
|
||||||
[node name="Panel" type="TextureRect" parent="."]
|
[node name="Panel" type="TextureRect" parent="."]
|
||||||
layout_mode = 1
|
|
||||||
anchors_preset = 15
|
anchors_preset = 15
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
anchor_bottom = 1.0
|
anchor_bottom = 1.0
|
||||||
|
@ -46,7 +45,6 @@ texture = ExtResource("2_q14jx")
|
||||||
stretch_mode = 1
|
stretch_mode = 1
|
||||||
|
|
||||||
[node name="Content" type="VBoxContainer" parent="."]
|
[node name="Content" type="VBoxContainer" parent="."]
|
||||||
layout_mode = 1
|
|
||||||
anchors_preset = 15
|
anchors_preset = 15
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
anchor_bottom = 1.0
|
anchor_bottom = 1.0
|
||||||
|
@ -55,23 +53,29 @@ grow_vertical = 2
|
||||||
alignment = 1
|
alignment = 1
|
||||||
|
|
||||||
[node name="Authors" type="Label" parent="Content"]
|
[node name="Authors" type="Label" parent="Content"]
|
||||||
layout_mode = 2
|
offset_right = 284.0
|
||||||
|
offset_bottom = 18.0
|
||||||
text = "A game by Ichicoro and Steffo"
|
text = "A game by Ichicoro and Steffo"
|
||||||
horizontal_alignment = 1
|
horizontal_alignment = 1
|
||||||
|
|
||||||
[node name="Title" type="Label" parent="Content"]
|
[node name="Title" type="Label" parent="Content"]
|
||||||
layout_mode = 2
|
offset_top = 25.0
|
||||||
|
offset_right = 284.0
|
||||||
|
offset_bottom = 75.0
|
||||||
size_flags_vertical = 6
|
size_flags_vertical = 6
|
||||||
theme_override_font_sizes/font_size = 48
|
theme_override_font_sizes/font_size = 48
|
||||||
text = "Harvest"
|
text = "Harvest"
|
||||||
horizontal_alignment = 1
|
horizontal_alignment = 1
|
||||||
|
|
||||||
[node name="Control" type="Control" parent="Content"]
|
[node name="Control" type="Control" parent="Content"]
|
||||||
layout_mode = 2
|
layout_mode = 3
|
||||||
|
anchors_preset = 0
|
||||||
|
offset_top = 110.0
|
||||||
|
offset_right = 284.0
|
||||||
|
offset_bottom = 110.0
|
||||||
size_flags_vertical = 6
|
size_flags_vertical = 6
|
||||||
|
|
||||||
[node name="Play" type="Button" parent="Content/Control"]
|
[node name="Play" type="Button" parent="Content/Control"]
|
||||||
layout_mode = 1
|
|
||||||
anchors_preset = 8
|
anchors_preset = 8
|
||||||
anchor_left = 0.5
|
anchor_left = 0.5
|
||||||
anchor_top = 0.5
|
anchor_top = 0.5
|
||||||
|
@ -90,7 +94,9 @@ text = "Play"
|
||||||
script = SubResource("GDScript_25oo4")
|
script = SubResource("GDScript_25oo4")
|
||||||
|
|
||||||
[node name="Authors2" type="Label" parent="Content"]
|
[node name="Authors2" type="Label" parent="Content"]
|
||||||
layout_mode = 2
|
offset_top = 142.0
|
||||||
|
offset_right = 284.0
|
||||||
|
offset_bottom = 160.0
|
||||||
size_flags_vertical = 1
|
size_flags_vertical = 1
|
||||||
text = "Ludum Dare 52 - Harvest"
|
text = "Ludum Dare 52 - Harvest"
|
||||||
horizontal_alignment = 1
|
horizontal_alignment = 1
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
[gd_scene load_steps=17 format=3 uid="uid://dnrl0uycbw3lp"]
|
[gd_scene load_steps=16 format=3 uid="uid://dnrl0uycbw3lp"]
|
||||||
|
|
||||||
[ext_resource type="Script" path="res://player/player.gd" id="1_rujcr"]
|
[ext_resource type="Script" path="res://player/player.gd" id="1_rujcr"]
|
||||||
[ext_resource type="Script" path="res://player/Head.gd" id="2_ohlgu"]
|
[ext_resource type="Script" path="res://player/Head.gd" id="2_ohlgu"]
|
||||||
|
@ -68,9 +68,6 @@ func spawn_points_label(text: String, offset: Vector2):
|
||||||
|
|
||||||
"
|
"
|
||||||
|
|
||||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_avmet"]
|
|
||||||
bg_color = Color(0, 0, 0, 0.647059)
|
|
||||||
|
|
||||||
[sub_resource type="GDScript" id="GDScript_7qy62"]
|
[sub_resource type="GDScript" id="GDScript_7qy62"]
|
||||||
script/source = "extends Camera3D
|
script/source = "extends Camera3D
|
||||||
|
|
||||||
|
@ -96,12 +93,12 @@ func _process(delta: float) -> void:
|
||||||
shader = ExtResource("4_dut1p")
|
shader = ExtResource("4_dut1p")
|
||||||
shader_parameter/center_enabled = false
|
shader_parameter/center_enabled = false
|
||||||
shader_parameter/legs_enabled = true
|
shader_parameter/legs_enabled = true
|
||||||
shader_parameter/inverted = false
|
shader_parameter/inverted = true
|
||||||
shader_parameter/color_id = null
|
shader_parameter/color_id = 0
|
||||||
shader_parameter/color_0 = null
|
shader_parameter/color_0 = Quaternion(0, 1, 0, 1)
|
||||||
shader_parameter/color_1 = null
|
shader_parameter/color_1 = Quaternion(1, 0, 0, 1)
|
||||||
shader_parameter/color_2 = null
|
shader_parameter/color_2 = Quaternion(0, 0, 1, 1)
|
||||||
shader_parameter/center_radius = 0.002
|
shader_parameter/center_radius = 0.005
|
||||||
shader_parameter/width = 0.001
|
shader_parameter/width = 0.001
|
||||||
shader_parameter/len = 0.008
|
shader_parameter/len = 0.008
|
||||||
shader_parameter/spacing = 0.006
|
shader_parameter/spacing = 0.006
|
||||||
|
@ -152,13 +149,12 @@ grow_vertical = 2
|
||||||
stretch = true
|
stretch = true
|
||||||
|
|
||||||
[node name="GameViewport" type="SubViewport" parent="Head/Viewport/CameraViewportContainer"]
|
[node name="GameViewport" type="SubViewport" parent="Head/Viewport/CameraViewportContainer"]
|
||||||
transparent_bg = true
|
|
||||||
handle_input_locally = false
|
handle_input_locally = false
|
||||||
size = Vector2i(284, 160)
|
|
||||||
render_target_update_mode = 4
|
render_target_update_mode = 4
|
||||||
|
|
||||||
[node name="Camera" type="Camera3D" parent="Head/Viewport/CameraViewportContainer/GameViewport"]
|
[node name="Camera" type="Camera3D" parent="Head/Viewport/CameraViewportContainer/GameViewport"]
|
||||||
transform = Transform3D(1, 0, 1.74846e-07, 0, 1, 0, -1.74846e-07, 0, 1, 0, 0.54, 0)
|
transform = Transform3D(1, 0, 1.74846e-07, 0, 1, 0, -1.74846e-07, 0, 1, 0, 0.54, 0)
|
||||||
|
cull_mask = 1048573
|
||||||
current = true
|
current = true
|
||||||
fov = 80.0
|
fov = 80.0
|
||||||
near = 0.001
|
near = 0.001
|
||||||
|
@ -186,6 +182,7 @@ grow_vertical = 2
|
||||||
theme = SubResource("Theme_smyke")
|
theme = SubResource("Theme_smyke")
|
||||||
|
|
||||||
[node name="FPS_Label" type="Label" parent="HUD"]
|
[node name="FPS_Label" type="Label" parent="HUD"]
|
||||||
|
visible = false
|
||||||
layout_mode = 1
|
layout_mode = 1
|
||||||
anchors_preset = 1
|
anchors_preset = 1
|
||||||
anchor_left = 1.0
|
anchor_left = 1.0
|
||||||
|
@ -210,6 +207,7 @@ grow_vertical = 2
|
||||||
script = SubResource("GDScript_5d122")
|
script = SubResource("GDScript_5d122")
|
||||||
|
|
||||||
[node name="Speed_Label" type="Label" parent="HUD"]
|
[node name="Speed_Label" type="Label" parent="HUD"]
|
||||||
|
visible = false
|
||||||
layout_mode = 1
|
layout_mode = 1
|
||||||
anchors_preset = 8
|
anchors_preset = 8
|
||||||
anchor_left = 0.5
|
anchor_left = 0.5
|
||||||
|
@ -225,31 +223,6 @@ grow_vertical = 2
|
||||||
horizontal_alignment = 1
|
horizontal_alignment = 1
|
||||||
vertical_alignment = 1
|
vertical_alignment = 1
|
||||||
|
|
||||||
[node name="Panel" type="Panel" parent="HUD"]
|
|
||||||
visible = false
|
|
||||||
layout_mode = 1
|
|
||||||
anchors_preset = 3
|
|
||||||
anchor_left = 1.0
|
|
||||||
anchor_top = 1.0
|
|
||||||
anchor_right = 1.0
|
|
||||||
anchor_bottom = 1.0
|
|
||||||
offset_left = -276.0
|
|
||||||
offset_top = -122.0
|
|
||||||
offset_right = -40.0
|
|
||||||
offset_bottom = -40.0
|
|
||||||
grow_horizontal = 0
|
|
||||||
grow_vertical = 0
|
|
||||||
theme_override_styles/panel = SubResource("StyleBoxFlat_avmet")
|
|
||||||
|
|
||||||
[node name="ColorRect" type="ColorRect" parent="HUD/Panel"]
|
|
||||||
layout_mode = 1
|
|
||||||
anchors_preset = 15
|
|
||||||
anchor_right = 1.0
|
|
||||||
anchor_bottom = 1.0
|
|
||||||
grow_horizontal = 2
|
|
||||||
grow_vertical = 2
|
|
||||||
color = Color(0, 0, 0, 0.745098)
|
|
||||||
|
|
||||||
[node name="BackBufferCopy2" type="BackBufferCopy" parent="HUD"]
|
[node name="BackBufferCopy2" type="BackBufferCopy" parent="HUD"]
|
||||||
position = Vector2(727, 447)
|
position = Vector2(727, 447)
|
||||||
scale = Vector2(7.61, 4.89)
|
scale = Vector2(7.61, 4.89)
|
||||||
|
@ -285,24 +258,13 @@ layout_mode = 1
|
||||||
anchors_preset = 15
|
anchors_preset = 15
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
anchor_bottom = 1.0
|
anchor_bottom = 1.0
|
||||||
offset_top = -5.0
|
|
||||||
offset_bottom = -5.0
|
|
||||||
grow_horizontal = 2
|
grow_horizontal = 2
|
||||||
grow_vertical = 2
|
grow_vertical = 2
|
||||||
|
|
||||||
[node name="BackBufferCopy" type="BackBufferCopy" parent="HUD"]
|
[node name="BackBufferCopy" type="BackBufferCopy" parent="HUD"]
|
||||||
y_sort_enabled = true
|
|
||||||
position = Vector2(721, 449)
|
|
||||||
scale = Vector2(7.21, 4.54)
|
|
||||||
|
|
||||||
[node name="GameFilter" type="ColorRect" parent="HUD"]
|
|
||||||
visible = false
|
visible = false
|
||||||
layout_mode = 1
|
y_sort_enabled = true
|
||||||
anchors_preset = 15
|
position = Vector2(140, 79)
|
||||||
anchor_right = 1.0
|
scale = Vector2(1.65, 1)
|
||||||
anchor_bottom = 1.0
|
|
||||||
grow_horizontal = 2
|
|
||||||
grow_vertical = 2
|
|
||||||
metadata/_edit_layout_mode = 1
|
|
||||||
|
|
||||||
[node name="RigidDynamicBody3D" type="RigidBody3D" parent="."]
|
[node name="RigidDynamicBody3D" type="RigidBody3D" parent="."]
|
||||||
|
|
|
@ -8,6 +8,8 @@ const MOUSE_SENSITIVITY = 2.25
|
||||||
const MAX_AIR_WISH_SPEED = 20
|
const MAX_AIR_WISH_SPEED = 20
|
||||||
const AIR_ACCELERATE = 100 # Hu/39.97
|
const AIR_ACCELERATE = 100 # Hu/39.97
|
||||||
|
|
||||||
|
@export var viewport_resolution: Vector2 = Vector2(852, 420)
|
||||||
|
|
||||||
@onready var head: Node3D = $Head
|
@onready var head: Node3D = $Head
|
||||||
@onready var camera: Camera3D = head.get_node("Viewport/CameraViewportContainer/GameViewport/Camera")
|
@onready var camera: Camera3D = head.get_node("Viewport/CameraViewportContainer/GameViewport/Camera")
|
||||||
@onready var vport: SubViewport = head.get_node("Viewport/CameraViewportContainer/GameViewport")
|
@onready var vport: SubViewport = head.get_node("Viewport/CameraViewportContainer/GameViewport")
|
||||||
|
@ -41,11 +43,7 @@ func _get_2d_velocity() -> Vector2:
|
||||||
func _ready():
|
func _ready():
|
||||||
Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
|
Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
|
||||||
OnHand.player = self
|
OnHand.player = self
|
||||||
# vport.size = DisplayServer.window_get_size()
|
vport.size = viewport_resolution
|
||||||
vport.size = Vector2(426, 240)
|
|
||||||
# for item in OnHand.get_children():
|
|
||||||
# if item is BaseWeapon:
|
|
||||||
# item.player = self
|
|
||||||
|
|
||||||
func _process(delta):
|
func _process(delta):
|
||||||
pass
|
pass
|
||||||
|
|
|
@ -76,6 +76,26 @@ jump={
|
||||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":32,"unicode":0,"echo":false,"script":null)
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":32,"unicode":0,"echo":false,"script":null)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
slot1={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":49,"unicode":0,"echo":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
slot2={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":50,"unicode":0,"echo":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
slot3={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":51,"unicode":0,"echo":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
toggle_torch={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":70,"unicode":0,"echo":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
[rendering]
|
[rendering]
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue