temporary commit

This commit is contained in:
Haze Weathers 2025-07-25 17:56:33 -06:00
parent 8165cda61c
commit 84b689b819
14 changed files with 167 additions and 40 deletions

View file

@ -150,77 +150,91 @@ initial_expression_properties = {
[node name="Root" type="Node" parent="StateChart"]
script = ExtResource("5_ox6hb")
initial_state = NodePath("Active")
[node name="Active" type="Node" parent="StateChart/Root"]
script = ExtResource("5_ox6hb")
initial_state = NodePath("Moving")
[node name="on GoalEntered" type="Node" parent="StateChart/Root"]
[node name="on GoalEntered" type="Node" parent="StateChart/Root/Active"]
script = ExtResource("7_epv8h")
to = NodePath("../Winning")
to = NodePath("../../Inactive/Winning")
event = &"goal_entered"
delay_in_seconds = "0.0"
[node name="on PoleAttached" type="Node" parent="StateChart/Root"]
[node name="on Died" type="Node" parent="StateChart/Root/Active"]
script = ExtResource("7_epv8h")
to = NodePath("../../Inactive/Winning")
event = &"goal_entered"
delay_in_seconds = "0.0"
[node name="on PoleAttached" type="Node" parent="StateChart/Root/Active"]
script = ExtResource("7_epv8h")
to = NodePath("../PoleSpinning")
event = &"pole_attached"
delay_in_seconds = "0.0"
[node name="Idle" type="Node" parent="StateChart/Root"]
[node name="Idle" type="Node" parent="StateChart/Root/Active"]
script = ExtResource("6_bu01i")
[node name="on ChargePressed" type="Node" parent="StateChart/Root/Idle"]
[node name="on ChargePressed" type="Node" parent="StateChart/Root/Active/Idle"]
script = ExtResource("7_epv8h")
to = NodePath("../../Charging")
event = &"charge_pressed"
delay_in_seconds = "0.0"
[node name="when Moving" type="Node" parent="StateChart/Root/Idle"]
[node name="when Moving" type="Node" parent="StateChart/Root/Active/Idle"]
script = ExtResource("7_epv8h")
to = NodePath("../../Moving")
guard = SubResource("Resource_ej40h")
delay_in_seconds = "0.0"
[node name="Moving" type="Node" parent="StateChart/Root"]
[node name="Moving" type="Node" parent="StateChart/Root/Active"]
script = ExtResource("6_bu01i")
[node name="when Stopped" type="Node" parent="StateChart/Root/Moving"]
[node name="when Stopped" type="Node" parent="StateChart/Root/Active/Moving"]
script = ExtResource("7_epv8h")
to = NodePath("../../Idle")
guard = SubResource("Resource_637i1")
delay_in_seconds = "0.0"
[node name="Charging" type="Node" parent="StateChart/Root"]
[node name="Charging" type="Node" parent="StateChart/Root/Active"]
script = ExtResource("6_bu01i")
[node name="on ChargeReleased" type="Node" parent="StateChart/Root/Charging"]
[node name="on ChargeReleased" type="Node" parent="StateChart/Root/Active/Charging"]
script = ExtResource("7_epv8h")
to = NodePath("../../Moving")
event = &"charge_released"
delay_in_seconds = "0.0"
[node name="Winning" type="Node" parent="StateChart/Root"]
[node name="PoleSpinning" type="Node" parent="StateChart/Root/Active"]
script = ExtResource("6_bu01i")
[node name="PoleSpinning" type="Node" parent="StateChart/Root"]
script = ExtResource("6_bu01i")
[node name="Transition" type="Node" parent="StateChart/Root/PoleSpinning"]
[node name="Transition" type="Node" parent="StateChart/Root/Active/PoleSpinning"]
script = ExtResource("7_epv8h")
to = NodePath("../../Moving")
event = &"charge_pressed"
delay_in_seconds = "0.0"
[node name="Inactive" type="Node" parent="StateChart/Root"]
script = ExtResource("5_ox6hb")
initial_state = NodePath("Winning")
[node name="Winning" type="Node" parent="StateChart/Root/Inactive"]
script = ExtResource("6_bu01i")
[connection signal="bounced" from="." to="Sounds/WallBounce" method="play"]
[connection signal="charge_canceled" from="." to="Sounds/ChargeCancel" method="play"]
[connection signal="shot" from="." to="Sounds/Shoot" method="play"]
[connection signal="state_physics_processing" from="StateChart/Root/Idle" to="." method="_apply_gravity"]
[connection signal="state_physics_processing" from="StateChart/Root/Moving" to="." method="_apply_gravity"]
[connection signal="state_physics_processing" from="StateChart/Root/Moving" to="." method="_slow_to_stop"]
[connection signal="state_physics_processing" from="StateChart/Root/Moving" to="." method="_bounce_on_walls"]
[connection signal="state_entered" from="StateChart/Root/Charging" to="." method="_start_charge"]
[connection signal="state_entered" from="StateChart/Root/Charging" to="Sounds/ChargeStart" method="play"]
[connection signal="state_exited" from="StateChart/Root/Charging" to="." method="_end_charge"]
[connection signal="state_physics_processing" from="StateChart/Root/Charging" to="." method="_update_charge"]
[connection signal="state_entered" from="StateChart/Root/Winning" to="." method="_start_winning"]
[connection signal="state_entered" from="StateChart/Root/PoleSpinning" to="." method="_start_pole_spin"]
[connection signal="state_exited" from="StateChart/Root/PoleSpinning" to="." method="_end_pole_spin"]
[connection signal="state_physics_processing" from="StateChart/Root/PoleSpinning" to="." method="_process_pole_spin"]
[connection signal="state_physics_processing" from="StateChart/Root/Active/Idle" to="." method="_apply_gravity"]
[connection signal="state_physics_processing" from="StateChart/Root/Active/Moving" to="." method="_slow_to_stop"]
[connection signal="state_physics_processing" from="StateChart/Root/Active/Moving" to="." method="_apply_gravity"]
[connection signal="state_physics_processing" from="StateChart/Root/Active/Moving" to="." method="_bounce_on_walls"]
[connection signal="state_entered" from="StateChart/Root/Active/Charging" to="." method="_start_charge"]
[connection signal="state_entered" from="StateChart/Root/Active/Charging" to="Sounds/ChargeStart" method="play"]
[connection signal="state_exited" from="StateChart/Root/Active/Charging" to="." method="_end_charge"]
[connection signal="state_physics_processing" from="StateChart/Root/Active/Charging" to="." method="_update_charge"]
[connection signal="state_entered" from="StateChart/Root/Active/PoleSpinning" to="." method="_start_pole_spin"]
[connection signal="state_exited" from="StateChart/Root/Active/PoleSpinning" to="." method="_end_pole_spin"]
[connection signal="state_physics_processing" from="StateChart/Root/Active/PoleSpinning" to="." method="_process_pole_spin"]
[connection signal="state_entered" from="StateChart/Root/Inactive/Winning" to="." method="_start_winning"]

View file

@ -5,12 +5,11 @@
[ext_resource type="AudioStream" uid="uid://cgotekctoej7m" path="res://assets/sounds/enemies/skull_death.ogg" id="3_6ybas"]
[sub_resource type="CylinderShape3D" id="CylinderShape3D_ictao"]
height = 1.0
radius = 0.8
height = 0.5
radius = 0.4
[sub_resource type="CylinderShape3D" id="CylinderShape3D_cdksx"]
height = 1.0
radius = 0.95
height = 0.5
[node name="Boney" type="CharacterBody3D" node_paths=PackedStringArray("model", "death_sound")]
script = ExtResource("1_ledhy")
@ -23,10 +22,10 @@ model = NodePath("Model")
death_sound = NodePath("DeathSound")
[node name="Model" parent="." instance=ExtResource("2_lwsb0")]
transform = Transform3D(2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 1.5, 0)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.75, 0)
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.5, 0)
shape = SubResource("CylinderShape3D_ictao")
[node name="PlayerDetector" type="Area3D" parent="."]
@ -35,7 +34,7 @@ collision_mask = 16
monitorable = false
[node name="CollisionShape3D" type="CollisionShape3D" parent="PlayerDetector"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.5, 0)
shape = SubResource("CylinderShape3D_cdksx")
[node name="DeathSound" type="AudioStreamPlayer3D" parent="."]

View file

@ -1,9 +1,13 @@
extends CharacterBody3D
signal player_caught
@export var acceleration: float
@export var speed: float
@export var vertical_speed: float
@export var jumpscare: CanvasLayer
func _physics_process(delta: float) -> void:
@ -24,3 +28,8 @@ func _physics_process(delta: float) -> void:
var col = move_and_collide(velocity * delta)
if col:
velocity = velocity.bounce(col.get_normal())
func _on_player_detector_body_entered(body: Node3D) -> void:
if body is Player:
player_caught.emit()

View file

@ -1,7 +1,8 @@
[gd_scene load_steps=6 format=3 uid="uid://bndtsprfwrkau"]
[gd_scene load_steps=7 format=3 uid="uid://bndtsprfwrkau"]
[ext_resource type="Script" uid="uid://1mhmcaluavhg" path="res://objects/uncanny_cat.gd" id="1_bsm3e"]
[ext_resource type="Texture2D" uid="uid://c2a63sfnh6il" path="res://assets/textures/chaser/uncanny.png" id="2_eotxf"]
[ext_resource type="AudioStream" uid="uid://l6u7480xhrrl" path="res://assets/sounds/enemies/uncanny_jumpscare.ogg" id="3_ixuei"]
[sub_resource type="SphereShape3D" id="SphereShape3D_eotxf"]
radius = 0.45
@ -19,7 +20,7 @@ billboard_mode = 1
[sub_resource type="SphereShape3D" id="SphereShape3D_ixuei"]
[node name="UncannyCat" type="CharacterBody3D"]
[node name="UncannyCat" type="CharacterBody3D" node_paths=PackedStringArray("jumpscare")]
collision_layer = 32
collision_mask = 32
motion_mode = 1
@ -27,6 +28,7 @@ script = ExtResource("1_bsm3e")
acceleration = 0.6
speed = 1.5
vertical_speed = 0.5
jumpscare = NodePath("JumpscareLayer")
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
shape = SubResource("SphereShape3D_eotxf")
@ -45,3 +47,25 @@ monitorable = false
[node name="CollisionShape3D" type="CollisionShape3D" parent="PlayerDetector"]
shape = SubResource("SphereShape3D_ixuei")
[node name="JumpscareLayer" type="CanvasLayer" parent="."]
layer = 2
visible = false
[node name="Jumpscare" type="TextureRect" parent="JumpscareLayer"]
texture_filter = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("2_eotxf")
stretch_mode = 6
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."]
stream = ExtResource("3_ixuei")
bus = &"Sounds"
[connection signal="player_caught" from="." to="JumpscareLayer" method="show"]
[connection signal="player_caught" from="." to="AudioStreamPlayer" method="play"]
[connection signal="body_entered" from="PlayerDetector" to="." method="_on_player_detector_body_entered"]