goalpost
This commit is contained in:
parent
e1b43c8bc5
commit
08712cf22c
11 changed files with 244 additions and 37 deletions
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=15 format=3 uid="uid://cybm74xwbsivx"]
|
||||
[gd_scene load_steps=14 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" path="res://objects/canny_cat.gd" id="1_twfq8"]
|
||||
|
@ -9,11 +9,8 @@
|
|||
[ext_resource type="Script" path="res://addons/godot_state_charts/transition.gd" id="7_epv8h"]
|
||||
[ext_resource type="Script" path="res://addons/godot_state_charts/expression_guard.gd" id="8_d5slg"]
|
||||
|
||||
[sub_resource type="CylinderShape3D" id="CylinderShape3D_0aipe"]
|
||||
height = 0.25
|
||||
radius = 0.55
|
||||
|
||||
[sub_resource type="SphereShape3D" id="SphereShape3D_4o01j"]
|
||||
radius = 0.45
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_2xpb7"]
|
||||
shading_mode = 0
|
||||
|
@ -35,7 +32,7 @@ resource_name = "Not Moving"
|
|||
script = ExtResource("8_d5slg")
|
||||
expression = "velocity.is_zero_approx()"
|
||||
|
||||
[node name="CannyCat" type="CharacterBody3D" node_paths=PackedStringArray("state_chart", "power_indicator", "camera_arm", "wall_detector")]
|
||||
[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
|
||||
|
@ -55,25 +52,31 @@ 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")
|
||||
wall_detector = NodePath("WallDetector")
|
||||
|
||||
[node name="WallDetector" type="StaticBody3D" parent="."]
|
||||
collision_layer = 0
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="WallDetector"]
|
||||
shape = SubResource("CylinderShape3D_0aipe")
|
||||
collision_shape = NodePath("CollisionShape3D")
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||
shape = SubResource("SphereShape3D_4o01j")
|
||||
|
||||
[node name="CannySprite" type="Sprite3D" parent="."]
|
||||
[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="PowerIndicator" type="Node3D" parent="."]
|
||||
visible = false
|
||||
|
||||
|
@ -84,15 +87,6 @@ cast_shadow = 0
|
|||
gi_mode = 0
|
||||
mesh = SubResource("CylinderMesh_b16dl")
|
||||
|
||||
[node name="ShadowArm" type="SpringArm3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 0, 0)
|
||||
collision_mask = 7
|
||||
spring_length = 100.0
|
||||
|
||||
[node name="ShadowSprite" type="Sprite3D" parent="ShadowArm"]
|
||||
pixel_size = 0.0078
|
||||
texture = ExtResource("2_fwt6m")
|
||||
|
||||
[node name="CameraArm" type="SpringArm3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 0.5, 0.866025, 0, -0.866025, 0.5, 0, 0, 0)
|
||||
spring_length = 8.0
|
||||
|
@ -111,6 +105,12 @@ initial_expression_properties = {
|
|||
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="Idle" type="Node" parent="StateChart/Root"]
|
||||
script = ExtResource("6_bu01i")
|
||||
|
||||
|
@ -144,6 +144,9 @@ to = NodePath("../../Moving")
|
|||
event = &"charge_released"
|
||||
delay_in_seconds = "0.0"
|
||||
|
||||
[node name="Winning" type="Node" parent="StateChart/Root"]
|
||||
script = ExtResource("6_bu01i")
|
||||
|
||||
[connection signal="state_physics_processing" from="StateChart/Root/Idle" 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="_apply_gravity"]
|
||||
|
@ -151,3 +154,4 @@ delay_in_seconds = "0.0"
|
|||
[connection signal="state_entered" from="StateChart/Root/Charging" to="." method="_start_charge"]
|
||||
[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"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue