From fc5ea41e3a2b35a66c58e0f5e0c48bc5d2102576 Mon Sep 17 00:00:00 2001 From: HumanoidSandvichDispenser Date: Fri, 29 Mar 2024 16:16:51 -0700 Subject: [PATCH] add stats node to more characters --- Characters/Doc.tscn | 10 +++++++++- Characters/Player.tscn | 3 +-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Characters/Doc.tscn b/Characters/Doc.tscn index 1e4fe2f..631a871 100644 --- a/Characters/Doc.tscn +++ b/Characters/Doc.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=68 format=3 uid="uid://d2skjvvx6fal0"] +[gd_scene load_steps=70 format=3 uid="uid://d2skjvvx6fal0"] [ext_resource type="Script" path="res://Characters/Doc.cs" id="2_3elet"] [ext_resource type="Shader" path="res://Shaders/Flash.gdshader" id="2_5jxom"] @@ -7,8 +7,10 @@ [ext_resource type="Script" path="res://State/Character/CharacterStateMachine.cs" id="3_t5jjc"] [ext_resource type="Texture2D" uid="uid://dpepm54hjuyga" path="res://Assets/Sprites/Characters/forsen-hand.png" id="4_8lqj6"] [ext_resource type="Script" path="res://State/Character/NPCIdleState.cs" id="4_b35px"] +[ext_resource type="Script" path="res://Utils/PlayerStats.cs" id="5_a7fiw"] [ext_resource type="Script" path="res://State/Character/NPCMoveState.cs" id="5_pejsd"] [ext_resource type="Script" path="res://State/NPC/NPCStateMachine.cs" id="6_kjpug"] +[ext_resource type="Script" path="res://Utils/Values/DoubleValue.cs" id="6_kyulo"] [ext_resource type="Script" path="res://State/Character/CharacterDashState.cs" id="7_0ks57"] [ext_resource type="Script" path="res://State/NPC/Doc/DocTelegraphState.cs" id="7_tfwbh"] [ext_resource type="PackedScene" uid="uid://cjgxyhgcyvsv7" path="res://BoundingBoxes/Hurtbox.tscn" id="7_tnve0"] @@ -571,6 +573,12 @@ Inventory = NodePath("Inventory") StateMachine = NodePath("StateMachine") Hurtbox = NodePath("Hurtbox") +[node name="Stats" type="Node" parent="."] +script = ExtResource("5_a7fiw") + +[node name="StaggerDamage" type="Node" parent="Stats"] +script = ExtResource("6_kyulo") + [node name="StateMachine" type="Node" parent="." node_paths=PackedStringArray("InitialState", "Character")] script = ExtResource("3_t5jjc") InitialState = NodePath("Idle") diff --git a/Characters/Player.tscn b/Characters/Player.tscn index 1767787..9f13c30 100644 --- a/Characters/Player.tscn +++ b/Characters/Player.tscn @@ -576,7 +576,7 @@ size = Vector2(8, 8) closed = false polygon = PackedVector2Array(-3, 0, 2, 0) -[node name="Player" type="CharacterBody2D" node_paths=PackedStringArray("Camera", "DirectionMarker", "Stats", "Stats", "Sprite", "Inventory", "StateMachine", "Hurtbox")] +[node name="Player" type="CharacterBody2D" node_paths=PackedStringArray("Camera", "DirectionMarker", "Stats", "Sprite", "Inventory", "StateMachine", "Hurtbox")] y_sort_enabled = true texture_filter = 3 material = SubResource("ShaderMaterial_h78y7") @@ -585,7 +585,6 @@ collision_mask = 17 script = ExtResource("1_flygr") Camera = NodePath("Camera2D") DirectionMarker = NodePath("Direction2D") -Stats = NodePath("Stats") Speed = 80.0 Stats = NodePath("Stats") HandTexture = ExtResource("3_3dqh7")