Gamepad support
This commit is contained in:
parent
87f841e8e1
commit
ed369cf718
24 changed files with 240 additions and 78 deletions
|
|
@ -856,7 +856,7 @@ metadata/_edit_lock_ = true
|
|||
[node name="LeftUpperLeg" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt"]
|
||||
use_parent_material = true
|
||||
position = Vector2(6, 4)
|
||||
scale = Vector2(0.999835, 0.999835)
|
||||
scale = Vector2(0.999836, 0.999836)
|
||||
rest = Transform2D(1, 0, 0, 1, 6, 4)
|
||||
editor_settings/show_bone_gizmo = false
|
||||
|
||||
|
|
@ -896,7 +896,7 @@ metadata/_edit_lock_ = true
|
|||
[node name="Body" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt"]
|
||||
use_parent_material = true
|
||||
position = Vector2(1, -2)
|
||||
scale = Vector2(0.999829, 0.999829)
|
||||
scale = Vector2(0.999828, 0.999828)
|
||||
rest = Transform2D(1, 0, 0, 1, 1, -2)
|
||||
editor_settings/show_bone_gizmo = false
|
||||
|
||||
|
|
@ -904,7 +904,7 @@ editor_settings/show_bone_gizmo = false
|
|||
z_index = -1
|
||||
use_parent_material = true
|
||||
position = Vector2(-14, -23)
|
||||
scale = Vector2(0.999827, 0.999827)
|
||||
scale = Vector2(0.999828, 0.999828)
|
||||
rest = Transform2D(1, 0, 0, 1, -14, -23)
|
||||
editor_settings/show_bone_gizmo = false
|
||||
|
||||
|
|
@ -916,7 +916,7 @@ metadata/_edit_lock_ = true
|
|||
|
||||
[node name="RightLowerArm" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/RightUpperArm"]
|
||||
position = Vector2(-2, 15)
|
||||
scale = Vector2(0.999828, 0.999828)
|
||||
scale = Vector2(0.999829, 0.999829)
|
||||
rest = Transform2D(1, 0, 0, 1, -2, 15)
|
||||
editor_settings/show_bone_gizmo = false
|
||||
|
||||
|
|
@ -950,8 +950,8 @@ metadata/_edit_lock_ = true
|
|||
|
||||
[node name="Tie" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body"]
|
||||
position = Vector2(-9, -21)
|
||||
rotation = -0.151557
|
||||
skew = -0.000476003
|
||||
rotation = 0.0871529
|
||||
skew = -0.000476122
|
||||
rest = Transform2D(1, 0, 0, 1, -9, -21)
|
||||
auto_calculate_length_and_angle = false
|
||||
length = 24.0
|
||||
|
|
@ -989,6 +989,7 @@ metadata/_edit_lock_ = true
|
|||
|
||||
[node name="Right_Eye" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head"]
|
||||
position = Vector2(-16, -8)
|
||||
scale = Vector2(1, 1)
|
||||
texture = SubResource("AtlasTexture_vcc72")
|
||||
centered = false
|
||||
offset = Vector2(-2, -2)
|
||||
|
|
@ -996,15 +997,16 @@ metadata/_edit_lock_ = true
|
|||
|
||||
[node name="Left_Eye" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head"]
|
||||
position = Vector2(-4, -9)
|
||||
scale = Vector2(1, 1)
|
||||
texture = SubResource("AtlasTexture_kto0i")
|
||||
centered = false
|
||||
offset = Vector2(-2, -2)
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="Jaw" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head"]
|
||||
position = Vector2(-2.81092, 2.54366)
|
||||
rotation = -0.107471
|
||||
scale = Vector2(0.99983, 0.99983)
|
||||
position = Vector2(-3.00107, 2.99818)
|
||||
rotation = 0.00845789
|
||||
scale = Vector2(0.999829, 0.999829)
|
||||
texture = SubResource("AtlasTexture_x5uj2")
|
||||
centered = false
|
||||
offset = Vector2(-12, -2)
|
||||
|
|
@ -1077,7 +1079,7 @@ minTorque = -45.0
|
|||
maxTorque = 45.0
|
||||
|
||||
[node name="Left_Lower_Arm" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/HandProjectile"]
|
||||
rotation = -0.160747
|
||||
rotation = 0.0819429
|
||||
scale = Vector2(0.999998, 0.999998)
|
||||
texture = SubResource("AtlasTexture_auqeq")
|
||||
centered = false
|
||||
|
|
@ -1086,8 +1088,8 @@ metadata/_edit_lock_ = true
|
|||
|
||||
[node name="Left_Hand" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/HandProjectile/Left_Lower_Arm"]
|
||||
show_behind_parent = true
|
||||
position = Vector2(-0.999828, 12.9978)
|
||||
rotation = -0.133017
|
||||
position = Vector2(-0.99983, 12.9978)
|
||||
rotation = -0.0361645
|
||||
scale = Vector2(0.999656, 0.999656)
|
||||
texture = SubResource("AtlasTexture_vlvtp")
|
||||
centered = false
|
||||
|
|
@ -1165,7 +1167,7 @@ entity = NodePath("..")
|
|||
[node name="Mover" type="Node" parent="."]
|
||||
script = ExtResource("4_u5syx")
|
||||
_speed = SubResource("Resource_ckb7n")
|
||||
_speedControlMult = 1.02866
|
||||
_speedControlMult = 0.271112
|
||||
|
||||
[node name="HitPlayer" type="Node" parent="."]
|
||||
script = ExtResource("12_he8da")
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ atlas = ExtResource("3_ktw4a")
|
|||
region = Rect2(525, 241, 79, 72)
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_ktw4a"]
|
||||
size = Vector2(37, 66)
|
||||
size = Vector2(39.5, 66)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_3hyni"]
|
||||
atlas = ExtResource("3_ktw4a")
|
||||
|
|
@ -40,7 +40,7 @@ position = Vector2(8, -16)
|
|||
texture = SubResource("AtlasTexture_f4wwx")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox" index="0"]
|
||||
position = Vector2(-2, -13)
|
||||
position = Vector2(-0.75, -13)
|
||||
shape = SubResource("RectangleShape2D_ktw4a")
|
||||
|
||||
[node name="DragAction" type="Node" parent="Hitbox" index="1"]
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ material = SubResource("ShaderMaterial_yfuxj")
|
|||
texture = ExtResource("2_ffrjr")
|
||||
hframes = 10
|
||||
vframes = 2
|
||||
frame = 6
|
||||
|
||||
[node name="AnimationPlayer" parent="." index="1"]
|
||||
libraries = {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=11 format=3 uid="uid://bvpt0q4j6nx18"]
|
||||
[gd_scene load_steps=13 format=3 uid="uid://bvpt0q4j6nx18"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://dr8a0rx42o3qy" path="res://assets/sprites/gui/ChooseYourSeeds/PlantFrame.tres" id="1_1hnxi"]
|
||||
[ext_resource type="Script" uid="uid://bs1qywtqijyd2" path="res://scenes/gui/almanach.gd" id="1_oy57w"]
|
||||
|
|
@ -12,6 +12,13 @@
|
|||
[sub_resource type="ViewportTexture" id="ViewportTexture_ru62c"]
|
||||
viewport_path = NodePath("plants/Infobox/FrameAndTitle/VboxContainer/Frame/Previewport")
|
||||
|
||||
[sub_resource type="InputEventAction" id="InputEventAction_vvhxq"]
|
||||
action = &"ui_cancel"
|
||||
pressed = true
|
||||
|
||||
[sub_resource type="Shortcut" id="Shortcut_lmmwe"]
|
||||
events = [SubResource("InputEventAction_vvhxq")]
|
||||
|
||||
[sub_resource type="ViewportTexture" id="ViewportTexture_7yl8g"]
|
||||
viewport_path = NodePath("zombies/Infobox/FrameAndTitle/VBoxContainer/Frame/Previewport")
|
||||
|
||||
|
|
@ -81,6 +88,7 @@ texture = SubResource("ViewportTexture_ru62c")
|
|||
[node name="QuitButton" type="Button" parent="plants/Infobox/FrameAndTitle/VboxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 4
|
||||
shortcut = SubResource("Shortcut_lmmwe")
|
||||
text = "exit"
|
||||
|
||||
[node name="Label" type="Label" parent="plants/Infobox/FrameAndTitle"]
|
||||
|
|
|
|||
13
scenes/gui/cursor_canvas_layer.tscn
Normal file
13
scenes/gui/cursor_canvas_layer.tscn
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
[gd_scene load_steps=3 format=3 uid="uid://djfsa0pxqeoq1"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://c20dwjohaljdk" path="res://assets/sprites/atlases/cursor/default_arrow.png" id="1_0pqw0"]
|
||||
[ext_resource type="Script" uid="uid://c6ucy48qwaxuc" path="res://scripts/Cursor.cs" id="2_yv0fr"]
|
||||
|
||||
[node name="CursorCanvasLayer" type="CanvasLayer"]
|
||||
process_mode = 3
|
||||
layer = 11
|
||||
follow_viewport_enabled = true
|
||||
|
||||
[node name="Cursor" type="Sprite2D" parent="."]
|
||||
texture = ExtResource("1_0pqw0")
|
||||
script = ExtResource("2_yv0fr")
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=18 format=3 uid="uid://bfstrli64u23y"]
|
||||
[gd_scene load_steps=19 format=3 uid="uid://bfstrli64u23y"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://dvldjlg0nr355" path="res://assets/sprites/atlases/atlas1.png" id="1_jk1qb"]
|
||||
[ext_resource type="Script" uid="uid://drru785m4eep" path="res://scripts/gui/main_menu_rich_text.gd" id="2_5dd4i"]
|
||||
|
|
@ -13,6 +13,7 @@
|
|||
[ext_resource type="AudioStream" uid="uid://bdx83fokp6kha" path="res://assets/audio/sfx/buttonclick.mp3" id="8_5pajh"]
|
||||
[ext_resource type="AudioStream" uid="uid://djgyc7bbwcepp" path="res://assets/audio/music/Александр Зацепин - Увертюра.mp3" id="9_j7ex8"]
|
||||
[ext_resource type="PackedScene" uid="uid://bvpt0q4j6nx18" path="res://scenes/gui/almanach.tscn" id="12_rcqid"]
|
||||
[ext_resource type="PackedScene" uid="uid://djfsa0pxqeoq1" path="res://scenes/gui/cursor_canvas_layer.tscn" id="14_1ajci"]
|
||||
|
||||
[sub_resource type="GDScript" id="GDScript_5dd4i"]
|
||||
resource_name = "main_menu"
|
||||
|
|
@ -218,6 +219,8 @@ horizontal_alignment = 2
|
|||
vertical_alignment = 1
|
||||
script = SubResource("GDScript_flqon")
|
||||
|
||||
[node name="CursorCanvasLayer" parent="." instance=ExtResource("14_1ajci")]
|
||||
|
||||
[connection signal="meta_clicked" from="PrototypeWindow/ScrollContainer/PrototypeNotification" to="PrototypeWindow/ScrollContainer/PrototypeNotification" method="_on_meta_clicked"]
|
||||
[connection signal="pressed" from="Buttons/GameButtons/PlayButton" to="Buttons" method="_on_play_button_pressed"]
|
||||
[connection signal="pressed" from="Buttons/GameButtons/ExitButton" to="Buttons" method="_on_exit_button_pressed"]
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=7 format=3 uid="uid://ckanq33rao1ur"]
|
||||
[gd_scene load_steps=8 format=3 uid="uid://ckanq33rao1ur"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://b4lx8adw6rbqs" path="res://scenes/particles/dirt_explosion.tscn" id="1_c4q5e"]
|
||||
[ext_resource type="Texture2D" uid="uid://cad45iyh16x5g" path="res://assets/sprites/particles/nachinka1.tres" id="2_lgu5b"]
|
||||
|
|
@ -6,6 +6,7 @@
|
|||
[ext_resource type="Texture2D" uid="uid://b3yfl2had6t3o" path="res://assets/sprites/particles/nachinka2.tres" id="4_xwh7c"]
|
||||
[ext_resource type="Texture2D" uid="uid://e5v4vpux4h8k" path="res://assets/sprites/particles/nachinka3.tres" id="5_ryjsf"]
|
||||
[ext_resource type="Texture2D" uid="uid://dny6mfpspd3o8" path="res://assets/sprites/particles/nachinka4.tres" id="6_ursbv"]
|
||||
[ext_resource type="Script" uid="uid://b8v8xrsyswmg4" path="res://scripts/gamepad/ExplosionVibration.cs" id="7_xwh7c"]
|
||||
|
||||
[node name="PotatoExplosion" instance=ExtResource("1_c4q5e")]
|
||||
|
||||
|
|
@ -52,3 +53,6 @@ explosiveness = 1.0
|
|||
randomness = 0.11
|
||||
local_coords = true
|
||||
process_material = ExtResource("3_lgu5b")
|
||||
|
||||
[node name="VibrationController" type="Node" parent="." index="10"]
|
||||
script = ExtResource("7_xwh7c")
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=56 format=3 uid="uid://dd3yegl1xo44m"]
|
||||
[gd_scene load_steps=57 format=3 uid="uid://dd3yegl1xo44m"]
|
||||
|
||||
[ext_resource type="AudioStream" uid="uid://b6xb6mjdecg6a" path="res://assets/audio/sfx/level/readysetplant.mp3" id="1_4gg2g"]
|
||||
[ext_resource type="Script" uid="uid://bndu1h5kgcde8" path="res://scripts/level/RuntimeLevelData.cs" id="1_31ltw"]
|
||||
|
|
@ -37,6 +37,7 @@
|
|||
[ext_resource type="AudioStream" uid="uid://cfybn7wn04frs" path="res://assets/audio/music/Grasswalk_Standard.mp3" id="34_tqd4v"]
|
||||
[ext_resource type="AudioStream" uid="uid://get7nh1goi1c" path="res://assets/audio/music/Grasswalk_cool.mp3" id="35_4gg2g"]
|
||||
[ext_resource type="Script" uid="uid://bnj5tlcpmep2o" path="res://scripts/audio/MusicTransitioner.cs" id="36_wwgye"]
|
||||
[ext_resource type="PackedScene" uid="uid://djfsa0pxqeoq1" path="res://scenes/gui/cursor_canvas_layer.tscn" id="38_wwgye"]
|
||||
|
||||
[sub_resource type="Animation" id="Animation_vbgdr"]
|
||||
resource_name = "CYS_Sequence"
|
||||
|
|
@ -681,6 +682,7 @@ metadata/_edit_lock_ = true
|
|||
layer = -1
|
||||
|
||||
[node name="RuntimeGUI" parent="HUD" instance=ExtResource("4_okro4")]
|
||||
focus_neighbor_bottom = NodePath("../../GUI/ChooseYourSeeds")
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="Overlay" type="CanvasLayer" parent="."]
|
||||
|
|
@ -702,6 +704,7 @@ anchor_top = 1.0
|
|||
anchor_bottom = 2.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
focus_neighbor_top = NodePath("../../HUD/RuntimeGUI")
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="PauseMenu" parent="GUI" instance=ExtResource("6_4bmqp")]
|
||||
|
|
@ -895,6 +898,8 @@ ignore_time_scale = true
|
|||
|
||||
[node name="ReadySetPlantPlayer" type="AudioStreamPlayer" parent="."]
|
||||
|
||||
[node name="CursorCanvasLayer" parent="." instance=ExtResource("38_wwgye")]
|
||||
|
||||
[connection signal="OnLevelStateChanged" from="Data" to="SunSpawner/Timer" method="OnLevelStateChanged"]
|
||||
[connection signal="OnLevelStateChanged" from="Data" to="ZombieLevelPrevewer" method="OnLevelStateChanged"]
|
||||
[connection signal="OnLevelStateChanged" from="Data" to="InitialSpawner" method="OnLevelStateChanged"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue