1
Fork 0
mirror of https://github.com/Steffo99/cinnos.git synced 2024-10-16 14:27:37 +00:00

Add buccia

This commit is contained in:
Leonardo 2023-11-25 16:34:49 +01:00
parent 9d1ccdc2d2
commit 38e5445d55
3 changed files with 45 additions and 2 deletions

17
Buccia.gd Normal file
View file

@ -0,0 +1,17 @@
extends Area3D
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass
func _on_body_entered(body):
if body is Player:
body.on_banana()
pass # Replace with function body.

View file

@ -25,6 +25,8 @@ func do_jump():
current_jumps -= 1
velocity += jump_impulse
func on_banana():
velocity *= 2
func _physics_process(delta):

View file

@ -1,7 +1,7 @@
[gd_scene load_steps=20 format=3 uid="uid://4whij2hmts0t"]
[gd_scene load_steps=25 format=3 uid="uid://4whij2hmts0t"]
[ext_resource type="Script" path="res://Player.gd" id="1_wt4gx"]
[ext_resource type="Material" uid="uid://dondfiavgo2ws" path="res://Unshaded.material" id="2_upp15"]
[ext_resource type="Material" path="res://Unshaded.material" id="2_upp15"]
[ext_resource type="Texture2D" uid="uid://bwiymy4ls5l8a" path="res://addons/kenney_prototype_textures/red/texture_05.png" id="3_gtnhv"]
[ext_resource type="FontFile" uid="uid://cseshyj4yw2f5" path="res://fonts/FiraSans-Medium.ttf" id="3_p3wyc"]
[ext_resource type="Script" path="res://GameTimer.gd" id="3_y362g"]
@ -9,6 +9,7 @@
[ext_resource type="FontFile" uid="uid://qf3uxmta6lpw" path="res://fonts/FiraCode-Medium.ttf" id="5_yvnu2"]
[ext_resource type="Script" path="res://Camera3D.gd" id="8_auifr"]
[ext_resource type="PackedScene" uid="uid://ck1im1d6yhv84" path="res://obstacles/house.tscn" id="8_ntqnl"]
[ext_resource type="Script" path="res://Buccia.gd" id="10_ffcw5"]
[sub_resource type="Theme" id="Theme_hkcet"]
Label/fonts/font = ExtResource("3_p3wyc")
@ -43,6 +44,15 @@ size = Vector2(200, 200)
[sub_resource type="BoxShape3D" id="BoxShape3D_2bm1d"]
size = Vector3(200, 4, 200)
[sub_resource type="BoxShape3D" id="BoxShape3D_stil7"]
size = Vector3(0.976957, 1, 1)
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_icp2k"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_hs2tx"]
[sub_resource type="BoxMesh" id="BoxMesh_n8jcf"]
[node name="Root" type="Node3D"]
[node name="UI" type="Control" parent="."]
@ -181,4 +191,18 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 17.9757, 0, -2.54637)
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
transform = Transform3D(-0.579826, -0.58827, -0.563685, 0.632141, -0.761305, 0.144266, -0.514003, -0.272679, 0.813294, 0, 0, 0)
[node name="Buccia" type="Area3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -6.36238, 0.418784, -3.1441)
script = ExtResource("10_ffcw5")
[node name="CollisionShape3D" type="CollisionShape3D" parent="Buccia"]
shape = SubResource("BoxShape3D_stil7")
[node name="MeshInstance3D" type="MeshInstance3D" parent="Buccia/CollisionShape3D"]
material_override = SubResource("StandardMaterial3D_icp2k")
material_overlay = SubResource("StandardMaterial3D_hs2tx")
mesh = SubResource("BoxMesh_n8jcf")
skeleton = NodePath("../..")
[connection signal="timeout" from="UI/TextBox/Timer" to="UI/TextBox" method="_on_timer_timeout"]
[connection signal="body_entered" from="Buccia" to="Buccia" method="_on_body_entered"]