added player Finite State Machine
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
[gd_scene load_steps=62 format=3 uid="uid://dxgxbtf68lcv5"]
|
||||
[gd_scene load_steps=64 format=3 uid="uid://dxgxbtf68lcv5"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://1fqpoegbdm6n" path="res://PCs/hero.gd" id="1_pihpe"]
|
||||
[ext_resource type="Resource" uid="uid://b5pc3frhx467q" path="res://Classes/Engineer/class.tres" id="2_dbyo0"]
|
||||
[ext_resource type="PackedScene" uid="uid://ri8r03wqy80t" path="res://Scenes/8_direction_sprite.tscn" id="2_ib0t5"]
|
||||
[ext_resource type="Texture2D" uid="uid://dkbkam81k355s" path="res://Assets/TextureAtlases/gauntlet.tres" id="3_5myy0"]
|
||||
[ext_resource type="PackedScene" uid="uid://buvgdem68wtev" path="res://Scenes/Menus/PauseMenu/pause_menu.tscn" id="3_avnsx"]
|
||||
[ext_resource type="PackedScene" uid="uid://n8ab1cy7ordc" path="res://card_model/3d_card.tscn" id="4_2mqvj"]
|
||||
[ext_resource type="Script" uid="uid://cij76at0nbs1v" path="res://PCs/view_movement.gd" id="4_mhexa"]
|
||||
@@ -13,6 +12,7 @@
|
||||
[ext_resource type="Script" uid="uid://do24iuot0j7d7" path="res://Scripts/inventory.gd" id="6_cf5ap"]
|
||||
[ext_resource type="Texture2D" uid="uid://cjqxkraykhxxk" path="res://Classes/Engineer/red.png" id="6_yyp8i"]
|
||||
[ext_resource type="Script" uid="uid://3wvxl8jo4uis" path="res://PCs/weapon_movement.gd" id="7_14ugt"]
|
||||
[ext_resource type="PackedScene" uid="uid://bj2q72ch8nkek" path="res://card_placing_tool.tscn" id="8_7d213"]
|
||||
[ext_resource type="Script" uid="uid://b6kjrl7ae1mi0" path="res://PCs/hud.gd" id="8_yl6ka"]
|
||||
[ext_resource type="Script" uid="uid://hy51bq7x0fy8" path="res://Scripts/on_top_camera.gd" id="11_4sdwe"]
|
||||
[ext_resource type="PackedScene" uid="uid://ckl5tw5rmewhp" path="res://left_hand/card_hand_model.glb" id="11_h82f6"]
|
||||
@@ -47,14 +47,14 @@
|
||||
[ext_resource type="AudioStream" uid="uid://datdq1i45080i" path="res://Audio/open_002.wav" id="37_sa2xu"]
|
||||
[ext_resource type="AudioStream" uid="uid://dd1w61ri7ui4i" path="res://Audio/phaserDown3.ogg" id="40_pnv0q"]
|
||||
[ext_resource type="AudioStream" uid="uid://bll3n3pr8s4yy" path="res://Audio/phaserUp3.ogg" id="41_hussy"]
|
||||
[ext_resource type="Script" uid="uid://b5h7jfwkyokes" path="res://PCs/FSM/building_state.gd" id="47_d8pnf"]
|
||||
[ext_resource type="Script" uid="uid://cjdv1onyfej0m" path="res://PCs/FSM/carding_state.gd" id="48_7d213"]
|
||||
[ext_resource type="Script" uid="uid://cf7m4yyiqhhru" path="res://PCs/FSM/fighting_state.gd" id="49_60hic"]
|
||||
|
||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_jbu13"]
|
||||
radius = 0.3
|
||||
height = 1.8
|
||||
|
||||
[sub_resource type="ViewportTexture" id="ViewportTexture_8f12g"]
|
||||
viewport_path = NodePath("FirstPersonViewport/Head2/LeftHand/SubViewport")
|
||||
|
||||
[sub_resource type="ViewportTexture" id="ViewportTexture_v8f6r"]
|
||||
viewport_path = NodePath("FirstPersonViewport/Head2/LeftHand/SubViewport2")
|
||||
|
||||
@@ -113,18 +113,17 @@ stream_0/stream = ExtResource("36_lsvj8")
|
||||
streams_count = 1
|
||||
stream_0/stream = ExtResource("37_kv1mg")
|
||||
|
||||
[node name="Hero" type="CharacterBody3D" node_paths=PackedStringArray("camera", "gun_camera", "left_hand_sprite", "left_hand", "right_hand", "edit_tool", "gauntlet_sprite", "sprite", "interaction_raycast", "draw_pile", "hand", "discard_pile", "gauntlet_cards", "hud", "movement", "player_name_tag", "weapon_swap_timer", "ears", "place_card_audio", "swap_card_audio", "ready_audio", "unready_audio", "fullpower_audio", "zeropower_audio", "swap_off_audio", "swap_on_audio")]
|
||||
[node name="Hero" type="CharacterBody3D" node_paths=PackedStringArray("camera", "gun_camera", "left_hand", "right_hand", "edit_tool", "carding_tool", "sprite", "interaction_raycast", "draw_pile", "hand", "discard_pile", "gauntlet_cards", "hud", "movement", "player_name_tag", "weapon_swap_timer", "editing_states", "fighting_state", "default_state", "ears", "place_card_audio", "swap_card_audio", "ready_audio", "unready_audio", "fullpower_audio", "zeropower_audio", "swap_off_audio", "swap_on_audio")]
|
||||
collision_layer = 2
|
||||
collision_mask = 37
|
||||
script = ExtResource("1_pihpe")
|
||||
hero_class = ExtResource("2_dbyo0")
|
||||
camera = NodePath("ViewMovement/Head")
|
||||
gun_camera = NodePath("FirstPersonViewport/Head2")
|
||||
left_hand_sprite = NodePath("FirstPersonViewport/Head2/LeftHand/Sprite3D")
|
||||
left_hand = NodePath("FirstPersonViewport/Head2/LeftHand")
|
||||
right_hand = NodePath("FirstPersonViewport/Head2/RightHand")
|
||||
edit_tool = NodePath("ViewMovement/Head/EditTool")
|
||||
gauntlet_sprite = NodePath("FirstPersonViewport/Head2/RightHand/Gauntlet")
|
||||
carding_tool = NodePath("ViewMovement/Head/CardPlacingTool")
|
||||
sprite = NodePath("EightDirectionSprite")
|
||||
interaction_raycast = NodePath("ViewMovement/Head/RayCast3D")
|
||||
draw_pile = NodePath("DrawPile")
|
||||
@@ -138,6 +137,9 @@ player_name_tag = NodePath("NametagViewport/Label")
|
||||
weapon_swap_timer = NodePath("WeaponSwapTimer")
|
||||
card3d_scene = ExtResource("4_2mqvj")
|
||||
card_select_scene = ExtResource("5_h82f6")
|
||||
editing_states = [NodePath("BuildingState"), NodePath("CardingState")]
|
||||
fighting_state = NodePath("FightingState")
|
||||
default_state = NodePath("BuildingState")
|
||||
ears = NodePath("AudioListener3D")
|
||||
place_card_audio = NodePath("PlaceCardAudio")
|
||||
swap_card_audio = NodePath("SwapCardAudio")
|
||||
@@ -162,7 +164,7 @@ player = NodePath("..")
|
||||
camera = NodePath("Head")
|
||||
focus_raycast = NodePath("Head/RayCast3D")
|
||||
enable_strafe_tilt = true
|
||||
tilt_amount_x = 0.7
|
||||
tilt_amount_x = 0.8
|
||||
|
||||
[node name="Head" type="Camera3D" parent="ViewMovement"]
|
||||
keep_aspect = 0
|
||||
@@ -176,6 +178,9 @@ hero = NodePath("../../..")
|
||||
target_position = Vector3(0, 0, -2)
|
||||
collision_mask = 24
|
||||
|
||||
[node name="CardPlacingTool" parent="ViewMovement/Head" node_paths=PackedStringArray("hero") instance=ExtResource("8_7d213")]
|
||||
hero = NodePath("../../..")
|
||||
|
||||
[node name="RayCast3D" type="RayCast3D" parent="ViewMovement"]
|
||||
target_position = Vector3(0, 0, -100)
|
||||
collision_mask = 65535
|
||||
@@ -200,12 +205,6 @@ tilt_amount_x = 12.0
|
||||
tilt_amount_y = 3.0
|
||||
weapon_rotation_amount = 0.001
|
||||
|
||||
[node name="Gauntlet" type="Sprite3D" parent="FirstPersonViewport/Head2/RightHand"]
|
||||
visible = false
|
||||
layers = 2
|
||||
texture_filter = 0
|
||||
texture = ExtResource("3_5myy0")
|
||||
|
||||
[node name="LeftHand" type="Node3D" parent="FirstPersonViewport/Head2"]
|
||||
transform = Transform3D(0.235, 0, 0, 0, 0.235, 0, 0, 0, 0.235, -0.645, -0.26, -1.04)
|
||||
visible = false
|
||||
@@ -224,21 +223,15 @@ render_target_update_mode = 4
|
||||
[node name="Node2D" parent="FirstPersonViewport/Head2/LeftHand/SubViewport3" instance=ExtResource("4_mwtvp")]
|
||||
visible = false
|
||||
|
||||
[node name="Sprite3D" type="Sprite3D" parent="FirstPersonViewport/Head2/LeftHand"]
|
||||
transform = Transform3D(0.3, 0, 0, 0, 0.3, 0, 0, 0, 0.3, 1.56, -0.245, 0)
|
||||
layers = 2
|
||||
texture_filter = 0
|
||||
texture = SubResource("ViewportTexture_8f12g")
|
||||
|
||||
[node name="Sprite3D2" type="Sprite3D" parent="FirstPersonViewport/Head2/LeftHand"]
|
||||
transform = Transform3D(0.35, 0, 0, 0, 0.35, 0, 0, 0, 0.35, 4.74969, -0.0599999, 0.0158834)
|
||||
transform = Transform3D(0.35, 0, 0, 0, 0.35, 0, 0, 0, 0.35, 4.72, -0.145, 1.581)
|
||||
layers = 2
|
||||
sorting_offset = 1.0
|
||||
texture_filter = 0
|
||||
texture = SubResource("ViewportTexture_v8f6r")
|
||||
|
||||
[node name="Sprite3D3" type="Sprite3D" parent="FirstPersonViewport/Head2/LeftHand"]
|
||||
transform = Transform3D(0.35, 0, 0, 0, 0.35, 0, 0, 0, 0.35, 6.03, -0.0599999, 0.0158834)
|
||||
transform = Transform3D(0.35, 0, 0, 0, 0.35, 0, 0, 0, 0.35, 6.01, -0.145, 1.581)
|
||||
layers = 2
|
||||
sorting_offset = 1.0
|
||||
texture_filter = 0
|
||||
@@ -816,6 +809,23 @@ bus = &"SFX"
|
||||
stream = ExtResource("41_hussy")
|
||||
bus = &"SFX"
|
||||
|
||||
[node name="BuildingState" type="Node" parent="." node_paths=PackedStringArray("swap_state", "hero")]
|
||||
script = ExtResource("47_d8pnf")
|
||||
swap_state = NodePath("../CardingState")
|
||||
hero = NodePath("..")
|
||||
metadata/_custom_type_script = "uid://b5h7jfwkyokes"
|
||||
|
||||
[node name="CardingState" type="Node" parent="." node_paths=PackedStringArray("swap_state", "hero")]
|
||||
script = ExtResource("48_7d213")
|
||||
swap_state = NodePath("../BuildingState")
|
||||
hero = NodePath("..")
|
||||
metadata/_custom_type_script = "uid://cjdv1onyfej0m"
|
||||
|
||||
[node name="FightingState" type="Node" parent="." node_paths=PackedStringArray("hero")]
|
||||
script = ExtResource("49_60hic")
|
||||
hero = NodePath("..")
|
||||
metadata/_custom_type_script = "uid://cf7m4yyiqhhru"
|
||||
|
||||
[connection signal="timeout" from="WeaponSwapTimer" to="." method="_on_timer_timeout"]
|
||||
|
||||
[editable path="FirstPersonViewport/Head2/LeftHand/card_hand_model"]
|
||||
|
||||
Reference in New Issue
Block a user