feat: final bits
This commit is contained in:
parent
d64c8d2b61
commit
cebae80b5c
34 changed files with 1827 additions and 373 deletions
43
project/objects/bash_pickup.tscn
Normal file
43
project/objects/bash_pickup.tscn
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
[gd_scene load_steps=4 format=3 uid="uid://cxkk7sfkv3otl"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://bhccbn5c7dhf7" path="res://models/pickups/pinecone.blend" id="1_f2ibw"]
|
||||
|
||||
[sub_resource type="GDScript" id="GDScript_f2ibw"]
|
||||
script/source = "extends Area3D
|
||||
|
||||
func _on_body_entered(body: Node3D) -> void:
|
||||
if body.is_class(\"PlayerBody\"):
|
||||
body.can_bash = true
|
||||
queue_free()
|
||||
GameUI.get_singleton().display_message(\"Bash through obstacles by pressing (X) during a split-step\")
|
||||
(body as PlayerBody).save_checkpoint()
|
||||
|
||||
func _physics_process(delta):
|
||||
$pinecone.rotate_y(delta * 2.0)
|
||||
"
|
||||
|
||||
[sub_resource type="SphereShape3D" id="SphereShape3D_4fish"]
|
||||
radius = 2.22562
|
||||
|
||||
[node name="BashPickup" type="Area3D"]
|
||||
script = SubResource("GDScript_f2ibw")
|
||||
|
||||
[node name="pinecone" parent="." instance=ExtResource("1_f2ibw")]
|
||||
transform = Transform3D(1.62103, 0, 0, 0, 1.62103, 0, 0, 0, 1.62103, 0, 0.235161, 0)
|
||||
|
||||
[node name="OmniLight3D" type="OmniLight3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.79643, 0)
|
||||
light_color = Color(0.880355, 0.555272, 0, 1)
|
||||
light_energy = 8.133
|
||||
omni_range = 3.15575
|
||||
|
||||
[node name="OmniLight3D2" type="OmniLight3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.38918, 0)
|
||||
light_color = Color(0.880355, 0.555272, 0, 1)
|
||||
light_energy = 8.133
|
||||
omni_range = 3.15575
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||
shape = SubResource("SphereShape3D_4fish")
|
||||
|
||||
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
|
||||
41
project/objects/breakable_boulder.tscn
Normal file
41
project/objects/breakable_boulder.tscn
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
[gd_scene load_steps=5 format=3 uid="uid://cbif1o8njtshs"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://2yqgpigg0wr8" path="res://models/props/rock.blend" id="1_mofqw"]
|
||||
|
||||
[sub_resource type="GDScript" id="GDScript_mofqw"]
|
||||
script/source = "extends Node3D
|
||||
|
||||
func _on_area_3d_body_entered(body: Node3D) -> void:
|
||||
print(\"Body entered \", body.get_path())
|
||||
if body.is_class(\"PlayerBody\") and body.get_node(\"PlayerStateMachine\").get_current_state() == \"BashState\":
|
||||
queue_free()
|
||||
"
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_yqw6a"]
|
||||
size = Vector3(6.69, 6.685, 5.35156)
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_mofqw"]
|
||||
size = Vector3(6.69, 6.685, 5.05249)
|
||||
|
||||
[node name="BreakableBoulder" type="Node3D"]
|
||||
script = SubResource("GDScript_mofqw")
|
||||
|
||||
[node name="Area3D" type="Area3D" parent="."]
|
||||
collision_layer = 2
|
||||
collision_mask = 2
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Area3D"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 3.00162, 0)
|
||||
shape = SubResource("BoxShape3D_yqw6a")
|
||||
debug_color = Color(0.09, 0.529833, 1, 0.835294)
|
||||
|
||||
[node name="StaticBody3D" type="StaticBody3D" parent="."]
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="StaticBody3D"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 3.00162, 0)
|
||||
shape = SubResource("BoxShape3D_mofqw")
|
||||
debug_color = Color(0.09, 0.529833, 1, 0.835294)
|
||||
|
||||
[node name="rock" parent="." instance=ExtResource("1_mofqw")]
|
||||
|
||||
[connection signal="body_entered" from="Area3D" to="." method="_on_area_3d_body_entered"]
|
||||
29
project/objects/game_over_effect.tscn
Normal file
29
project/objects/game_over_effect.tscn
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
[gd_scene load_steps=3 format=3 uid="uid://c6p8iu3mpsbwv"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://dqjurq1nq1fle" path="res://objects/tre.tscn" id="1_g0g6w"]
|
||||
|
||||
[sub_resource type="GDScript" id="GDScript_g0g6w"]
|
||||
script/source = "extends Node3D
|
||||
|
||||
@export var camera : Camera3D
|
||||
@export var trees : Array[Node3D]
|
||||
|
||||
func _process(delta: float):
|
||||
pass
|
||||
"
|
||||
|
||||
[node name="GameOverEffect" type="Node3D" node_paths=PackedStringArray("trees")]
|
||||
script = SubResource("GDScript_g0g6w")
|
||||
trees = [NodePath("Tree"), NodePath("Tree3"), NodePath("Tree4"), NodePath("Tree2")]
|
||||
|
||||
[node name="Tree" parent="." instance=ExtResource("1_g0g6w")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.38125, 0, -6.61966)
|
||||
|
||||
[node name="Tree3" parent="." instance=ExtResource("1_g0g6w")]
|
||||
transform = Transform3D(-0.398413, 0, -0.917206, 0, 1, 0, 0.917206, 0, -0.398413, 2.8449, 0, -4.31524)
|
||||
|
||||
[node name="Tree4" parent="." instance=ExtResource("1_g0g6w")]
|
||||
transform = Transform3D(-0.00326398, 0, -0.999995, 0, 1, 0, 0.999995, 0, -0.00326398, 5.11824, 0, -1.29329)
|
||||
|
||||
[node name="Tree2" parent="." instance=ExtResource("1_g0g6w")]
|
||||
transform = Transform3D(-0.487951, 0, 0.872871, 0, 1, 0, -0.872871, 0, -0.487951, -5.43739, 1.90735e-06, -2.48827)
|
||||
|
|
@ -7,9 +7,9 @@ script/source = "extends Area3D
|
|||
|
||||
func _on_body_entered(body: Node3D) -> void:
|
||||
if body.is_class(\"PlayerBody\"):
|
||||
body.set_can_jump(true)
|
||||
body.can_jump = true
|
||||
queue_free()
|
||||
GameUI.get_singleton().display_message(\"Jump by pressing F during a split-step\")
|
||||
GameUI.get_singleton().display_message(\"Jump by pressing (A) during a split-step\")
|
||||
(body as PlayerBody).save_checkpoint()
|
||||
|
||||
func _physics_process(delta):
|
||||
|
|
@ -17,7 +17,7 @@ func _physics_process(delta):
|
|||
"
|
||||
|
||||
[sub_resource type="SphereShape3D" id="SphereShape3D_a2vvy"]
|
||||
radius = 1.61546
|
||||
radius = 2.50626
|
||||
|
||||
[node name="JumpPickup" type="Area3D"]
|
||||
script = SubResource("GDScript_a2vvy")
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
[gd_scene load_steps=5 format=3 uid="uid://dcgsrdacswacl"]
|
||||
[gd_scene load_steps=6 format=3 uid="uid://dcgsrdacswacl"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://cl7a4q5m73vlw" path="res://models/player/character.blend" id="1_eqqp1"]
|
||||
[ext_resource type="PackedScene" uid="uid://clspx5suh5ywx" path="res://models/player/bash_attack.blend" id="2_uxov2"]
|
||||
[ext_resource type="PackedScene" uid="uid://dy4yl1paa8whs" path="res://ui/ui.tscn" id="2_ykyjo"]
|
||||
|
||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_bxedw"]
|
||||
|
|
@ -27,12 +28,15 @@ func _physics_process(_delta):
|
|||
|
||||
[node name="Player" type="PlayerBody"]
|
||||
physics_interpolation_mode = 1
|
||||
collision_layer = 2
|
||||
collision_mask = 3
|
||||
wall_min_slide_angle = 0.785398
|
||||
floor_max_angle = 0.460767
|
||||
floor_snap_length = 0.35
|
||||
acceleration = 15.0
|
||||
target_speed = 25.0
|
||||
split_step_time = 0.35
|
||||
split_step_stop_time = 0.34
|
||||
jump_impulse = Vector2(0.9, 5)
|
||||
|
||||
[node name="PlayerStateMachine" type="PlayerStateMachine" parent="."]
|
||||
|
|
@ -53,6 +57,10 @@ look_target_height = 1.5
|
|||
[node name="character" parent="." instance=ExtResource("1_eqqp1")]
|
||||
unique_name_in_owner = true
|
||||
|
||||
[node name="bash_attack" parent="character" instance=ExtResource("2_uxov2")]
|
||||
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 6.60846e-09, 1.19557, 0.0755919)
|
||||
visible = false
|
||||
|
||||
[node name="CanvasLayer" parent="." instance=ExtResource("2_ykyjo")]
|
||||
|
||||
[editable path="character"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue