226 lines
8.9 KiB
Text
226 lines
8.9 KiB
Text
[gd_scene load_steps=20 format=3 uid="uid://cybm74xwbsivx"]
|
|
|
|
[ext_resource type="Texture2D" uid="uid://3i17aqnrspma" path="res://assets/textures/player/canny.png" id="1_cp4br"]
|
|
[ext_resource type="Script" uid="uid://b04ridmyf6571" path="res://objects/canny_cat.gd" id="1_twfq8"]
|
|
[ext_resource type="Texture2D" uid="uid://bqg7vd5r7w8tm" path="res://assets/textures/shadow.png" id="2_fwt6m"]
|
|
[ext_resource type="AudioStream" uid="uid://7u8a6osl4buo" path="res://assets/sounds/player/grab.ogg" id="4_hojxu"]
|
|
[ext_resource type="Script" uid="uid://dsjiox4ahsvqn" path="res://addons/godot_state_charts/state_chart.gd" id="4_n67yk"]
|
|
[ext_resource type="Script" uid="uid://1csmnvxpk1j3" path="res://addons/godot_state_charts/compound_state.gd" id="5_ox6hb"]
|
|
[ext_resource type="AudioStream" uid="uid://dis5fg68ese7r" path="res://assets/sounds/player/cancel.ogg" id="5_v6u4q"]
|
|
[ext_resource type="AudioStream" uid="uid://dnyjfcq8m2r4f" path="res://assets/sounds/player/hit.ogg" id="6_a7neg"]
|
|
[ext_resource type="Script" uid="uid://kctk5uejlaoh" path="res://addons/godot_state_charts/atomic_state.gd" id="6_bu01i"]
|
|
[ext_resource type="AudioStream" uid="uid://bv4plfa1oj3tf" path="res://assets/sounds/player/wall_bump.ogg" id="7_8ee3y"]
|
|
[ext_resource type="Script" uid="uid://clasig0wood63" path="res://addons/godot_state_charts/transition.gd" id="7_epv8h"]
|
|
[ext_resource type="Script" uid="uid://m32s76pjucg7" path="res://addons/godot_state_charts/expression_guard.gd" id="8_d5slg"]
|
|
|
|
[sub_resource type="Gradient" id="Gradient_u5ds4"]
|
|
interpolation_mode = 2
|
|
offsets = PackedFloat32Array(0.2, 0.2, 0.433673, 0.642857, 0.826531, 1)
|
|
colors = PackedColorArray(0.501961, 0, 0, 1, 0.5, 0.6, 1, 1, 0.5, 1, 0.566667, 1, 0.925, 1, 0.5, 1, 1, 0.741667, 0.5, 1, 1, 0.5, 0.5, 1)
|
|
|
|
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_2xpb7"]
|
|
resource_local_to_scene = true
|
|
shading_mode = 0
|
|
albedo_color = Color(0.916968, 0.113727, 0, 1)
|
|
|
|
[sub_resource type="SphereShape3D" id="SphereShape3D_4o01j"]
|
|
radius = 0.45
|
|
|
|
[sub_resource type="AudioStreamInteractive" id="AudioStreamInteractive_plnjn"]
|
|
clip_count = 3
|
|
clip_0/name = &""
|
|
clip_0/auto_advance = 0
|
|
clip_1/name = &""
|
|
clip_1/auto_advance = 1
|
|
clip_1/next_clip = 0
|
|
clip_2/name = &""
|
|
clip_2/auto_advance = 0
|
|
|
|
[sub_resource type="CylinderMesh" id="CylinderMesh_b16dl"]
|
|
top_radius = 0.05
|
|
bottom_radius = 0.05
|
|
height = 4.0
|
|
radial_segments = 4
|
|
rings = 0
|
|
|
|
[sub_resource type="Resource" id="Resource_ej40h"]
|
|
script = ExtResource("8_d5slg")
|
|
expression = "not velocity.is_zero_approx()"
|
|
|
|
[sub_resource type="Resource" id="Resource_637i1"]
|
|
resource_name = "Not Moving"
|
|
script = ExtResource("8_d5slg")
|
|
expression = "velocity.is_zero_approx()"
|
|
|
|
[node name="CannyCat" type="CharacterBody3D" node_paths=PackedStringArray("state_chart", "graphics", "power_indicator", "camera_arm", "collision_shape")]
|
|
process_priority = -100
|
|
process_physics_priority = -100
|
|
collision_layer = 16
|
|
collision_mask = 3
|
|
axis_lock_angular_x = true
|
|
axis_lock_angular_y = true
|
|
axis_lock_angular_z = true
|
|
script = ExtResource("1_twfq8")
|
|
charge_gradient = SubResource("Gradient_u5ds4")
|
|
power_line_material = SubResource("StandardMaterial3D_2xpb7")
|
|
gravity = 10.0
|
|
friction = 10.0
|
|
friction_coef = 0.01
|
|
friction_pow = 60.0
|
|
power_scale = 20.0
|
|
power_sensitivity = 0.01
|
|
power_threshold = 0.2
|
|
stop_threshold = 0.1
|
|
camera_low_angle = 0.349066
|
|
camera_high_angle = 1.0472
|
|
camera_yaw_sensitivity = 0.00872665
|
|
camera_pitch_sensitivity = 0.00872665
|
|
state_chart = NodePath("StateChart")
|
|
graphics = NodePath("Graphics")
|
|
power_indicator = NodePath("PowerIndicator")
|
|
camera_arm = NodePath("CameraArm")
|
|
collision_shape = NodePath("CollisionShape3D")
|
|
|
|
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
|
shape = SubResource("SphereShape3D_4o01j")
|
|
|
|
[node name="Graphics" type="Node3D" parent="."]
|
|
|
|
[node name="CannySprite" type="Sprite3D" parent="Graphics"]
|
|
pixel_size = 0.0156
|
|
billboard = 1
|
|
texture_filter = 0
|
|
texture = ExtResource("1_cp4br")
|
|
|
|
[node name="ShadowArm" type="SpringArm3D" parent="Graphics"]
|
|
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, -0.25, 0)
|
|
collision_mask = 7
|
|
spring_length = 100.0
|
|
|
|
[node name="ShadowSprite" type="Sprite3D" parent="Graphics/ShadowArm"]
|
|
pixel_size = 0.0313
|
|
texture = ExtResource("2_fwt6m")
|
|
|
|
[node name="Sounds" type="Node3D" parent="."]
|
|
|
|
[node name="ChargeStart" type="AudioStreamPlayer3D" parent="Sounds"]
|
|
stream = ExtResource("4_hojxu")
|
|
bus = &"Sounds"
|
|
|
|
[node name="ChargeCancel" type="AudioStreamPlayer3D" parent="Sounds"]
|
|
stream = ExtResource("5_v6u4q")
|
|
bus = &"Sounds"
|
|
|
|
[node name="ChargeCancel2" type="AudioStreamPlayer3D" parent="Sounds"]
|
|
stream = SubResource("AudioStreamInteractive_plnjn")
|
|
bus = &"Sounds"
|
|
|
|
[node name="Shoot" type="AudioStreamPlayer3D" parent="Sounds"]
|
|
stream = ExtResource("6_a7neg")
|
|
bus = &"Sounds"
|
|
|
|
[node name="WallBounce" type="AudioStreamPlayer3D" parent="Sounds"]
|
|
stream = ExtResource("7_8ee3y")
|
|
bus = &"Sounds"
|
|
|
|
[node name="PowerIndicator" type="Node3D" parent="."]
|
|
visible = false
|
|
|
|
[node name="PowerLine" type="MeshInstance3D" parent="PowerIndicator"]
|
|
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 0, 2)
|
|
material_override = SubResource("StandardMaterial3D_2xpb7")
|
|
cast_shadow = 0
|
|
gi_mode = 0
|
|
mesh = SubResource("CylinderMesh_b16dl")
|
|
|
|
[node name="CameraArm" type="SpringArm3D" parent="."]
|
|
transform = Transform3D(1, 0, 0, 0, 0.5, 0.866025, 0, -0.866025, 0.5, 0, 0, 0)
|
|
collision_mask = 8
|
|
spring_length = 8.0
|
|
|
|
[node name="Camera3D" type="Camera3D" parent="CameraArm"]
|
|
current = true
|
|
|
|
[node name="StateChart" type="Node" parent="."]
|
|
script = ExtResource("4_n67yk")
|
|
track_in_editor = true
|
|
initial_expression_properties = {
|
|
"velocity": Vector3(0, 0, 0)
|
|
}
|
|
|
|
[node name="Root" type="Node" parent="StateChart"]
|
|
script = ExtResource("5_ox6hb")
|
|
initial_state = NodePath("Moving")
|
|
|
|
[node name="on GoalEntered" type="Node" parent="StateChart/Root"]
|
|
script = ExtResource("7_epv8h")
|
|
to = NodePath("../Winning")
|
|
event = &"goal_entered"
|
|
delay_in_seconds = "0.0"
|
|
|
|
[node name="on PoleAttached" type="Node" parent="StateChart/Root"]
|
|
script = ExtResource("7_epv8h")
|
|
to = NodePath("../PoleSpinning")
|
|
event = &"pole_attached"
|
|
delay_in_seconds = "0.0"
|
|
|
|
[node name="Idle" type="Node" parent="StateChart/Root"]
|
|
script = ExtResource("6_bu01i")
|
|
|
|
[node name="on ChargePressed" type="Node" parent="StateChart/Root/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"]
|
|
script = ExtResource("7_epv8h")
|
|
to = NodePath("../../Moving")
|
|
guard = SubResource("Resource_ej40h")
|
|
delay_in_seconds = "0.0"
|
|
|
|
[node name="Moving" type="Node" parent="StateChart/Root"]
|
|
script = ExtResource("6_bu01i")
|
|
|
|
[node name="when Stopped" type="Node" parent="StateChart/Root/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"]
|
|
script = ExtResource("6_bu01i")
|
|
|
|
[node name="on ChargeReleased" type="Node" parent="StateChart/Root/Charging"]
|
|
script = ExtResource("7_epv8h")
|
|
to = NodePath("../../Moving")
|
|
event = &"charge_released"
|
|
delay_in_seconds = "0.0"
|
|
|
|
[node name="Winning" type="Node" parent="StateChart/Root"]
|
|
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"]
|
|
script = ExtResource("7_epv8h")
|
|
to = NodePath("../../Moving")
|
|
event = &"charge_pressed"
|
|
delay_in_seconds = "0.0"
|
|
|
|
[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"]
|