Compare commits
2
Commits
b86decec25
...
233bbcfacf
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
233bbcfacf | ||
|
|
30b2ec013e |
No files matched your search
@@ -0,0 +1,20 @@
|
||||
extends Node2D
|
||||
|
||||
@export var hat_type:= "dunce1"
|
||||
|
||||
var hat_texture = load("res://art/hats/" + str(hat_type) + ".png")
|
||||
|
||||
func _ready() -> void:
|
||||
pass
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
pass
|
||||
|
||||
func on_contact(body: Node2D) -> void:
|
||||
print("BODY: " + str(body))
|
||||
%Player2D/HatSound.play()
|
||||
visible = false
|
||||
%Player2D/Sprite2D/HatSprite.texture = hat_texture
|
||||
%Player2D/Sprite2D/HatSprite.show()
|
||||
await get_tree().create_timer(0.2).timeout
|
||||
queue_free()
|
||||
@@ -0,0 +1 @@
|
||||
uid://47y55iry2pd6
|
||||
@@ -0,0 +1,21 @@
|
||||
[gd_scene format=3 uid="uid://bnuiagw3bblfh"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://47y55iry2pd6" path="res://hat_pickup.gd" id="1_fs7cl"]
|
||||
[ext_resource type="Texture2D" uid="uid://ba4kjeulthw1g" path="res://art/hats/dunce1.png" id="2_fs7cl"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_y0cpo"]
|
||||
|
||||
[node name="HatPickup" type="Node2D" unique_id=1739014101]
|
||||
script = ExtResource("1_fs7cl")
|
||||
|
||||
[node name="HatSprite" type="Sprite2D" parent="." unique_id=813041394]
|
||||
position = Vector2(0, -8)
|
||||
texture = ExtResource("2_fs7cl")
|
||||
|
||||
[node name="Area2D" type="Area2D" parent="." unique_id=726438646]
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D" unique_id=278855113]
|
||||
position = Vector2(0, -7)
|
||||
shape = SubResource("CircleShape2D_y0cpo")
|
||||
|
||||
[connection signal="body_entered" from="Area2D" to="." method="on_contact"]
|
||||
+2
-2
@@ -210,12 +210,12 @@ func _process(delta: float) -> void:
|
||||
elif direction and !dashing:
|
||||
velocity.x = direction * SPEED
|
||||
$Sprite2D.play("running")
|
||||
$Sprite2D/HatSprite.play("running")
|
||||
#$Sprite2D/HatSprite.play("running")
|
||||
|
||||
elif !dashing and !is_on_moving_platform:
|
||||
velocity.x = move_toward(velocity.x, 0, FRICTION)
|
||||
$Sprite2D.play("idle")
|
||||
$Sprite2D/HatSprite.play("idle")
|
||||
#$Sprite2D/HatSprite.play("idle")
|
||||
$Parallax2D/Sprite2D.modulate = BACKGROUND_COLOR
|
||||
|
||||
$MeditateMusic.volume_db = -100
|
||||
|
||||
+5
-29
@@ -18,16 +18,15 @@
|
||||
[ext_resource type="Texture2D" uid="uid://lmje8plw76e1" path="res://art/player/running/frame2.png" id="9_lu0ka"]
|
||||
[ext_resource type="Texture2D" uid="uid://bko8dvawpul3c" path="res://art/player/crystal4.png" id="9_ur4nw"]
|
||||
[ext_resource type="Texture2D" uid="uid://m5djssna67e1" path="res://art/player/crouch/frame3.png" id="9_w0gjo"]
|
||||
[ext_resource type="Texture2D" uid="uid://ba4kjeulthw1g" path="res://art/hats/dunce1.png" id="10_5s8kx"]
|
||||
[ext_resource type="Texture2D" uid="uid://cn31x2l44je2t" path="res://art/dash_glow.png" id="10_ur4nw"]
|
||||
[ext_resource type="Texture2D" uid="uid://biscdhn8jh8ha" path="res://art/jump_glow.png" id="11_3lee2"]
|
||||
[ext_resource type="Texture2D" uid="uid://cp1v5uhvbfws6" path="res://art/hats/dunce2.png" id="11_4apft"]
|
||||
[ext_resource type="Texture2D" uid="uid://dgq8el2qldlui" path="res://art/player/crystal.png" id="12_4apft"]
|
||||
[ext_resource type="AudioStream" uid="uid://bkiipooikacjj" path="res://sound/patience.wav" id="12_5s8kx"]
|
||||
[ext_resource type="Texture2D" uid="uid://d1tj8sw2hiwgw" path="res://art/dash_particle.png" id="16_ur4nw"]
|
||||
[ext_resource type="Texture2D" uid="uid://deacp021ytuew" path="res://art/jump_particle.png" id="18_fat58"]
|
||||
[ext_resource type="AudioStream" uid="uid://b4dkj4gmvk7bg" path="res://sound/double_jump.wav" id="20_1741q"]
|
||||
[ext_resource type="AudioStream" uid="uid://dc7bd22vwkf34" path="res://sound/death.wav" id="20_l50qk"]
|
||||
[ext_resource type="AudioStream" uid="uid://q7eau835xuja" path="res://sound/secret.wav" id="27_sxtm6"]
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_pmt5n"]
|
||||
shader = ExtResource("3_gt2ls")
|
||||
@@ -83,28 +82,6 @@ animations = [{
|
||||
"speed": 12.0
|
||||
}]
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_pmt5n"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": ExtResource("10_5s8kx")
|
||||
}],
|
||||
"loop": 1,
|
||||
"name": &"idle",
|
||||
"speed": 6.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": ExtResource("11_4apft")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": ExtResource("10_5s8kx")
|
||||
}],
|
||||
"loop": 1,
|
||||
"name": &"running",
|
||||
"speed": 6.0
|
||||
}]
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_5s8kx"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
@@ -180,14 +157,10 @@ animation = &"crouch"
|
||||
autoplay = "idle"
|
||||
frame_progress = 0.030440537
|
||||
|
||||
[node name="HatSprite" type="AnimatedSprite2D" parent="Sprite2D" unique_id=1954184475]
|
||||
[node name="HatSprite" type="Sprite2D" parent="Sprite2D" unique_id=122612770]
|
||||
visible = false
|
||||
position = Vector2(0, -13)
|
||||
scale = Vector2(0.9, 0.9)
|
||||
sprite_frames = SubResource("SpriteFrames_pmt5n")
|
||||
animation = &"running"
|
||||
autoplay = "idle"
|
||||
frame_progress = 0.8061519
|
||||
|
||||
[node name="DaydreamSprite" type="Sprite2D" parent="Sprite2D" unique_id=67766652]
|
||||
|
||||
@@ -232,3 +205,6 @@ stream = ExtResource("20_1741q")
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=1294571021]
|
||||
position = Vector2(0, 3)
|
||||
shape = SubResource("CapsuleShape2D_ix7pg")
|
||||
|
||||
[node name="HatSound" type="AudioStreamPlayer2D" parent="." unique_id=508539941]
|
||||
stream = ExtResource("27_sxtm6")
|
||||
@@ -37,6 +37,7 @@
|
||||
[ext_resource type="PackedScene" uid="uid://b61sumdnt0qqh" path="res://hidden_horizontal_moving_block.tscn" id="35_6ah6f"]
|
||||
[ext_resource type="PackedScene" uid="uid://7bjqgxckho" path="res://hidden_teleporter.tscn" id="36_g1i3r"]
|
||||
[ext_resource type="PackedScene" uid="uid://c13khrhjy5nrj" path="res://saw.tscn" id="37_my276"]
|
||||
[ext_resource type="PackedScene" uid="uid://bnuiagw3bblfh" path="res://hat_pickup.tscn" id="38_yx0jh"]
|
||||
|
||||
[node name="World" type="Node2D" unique_id=1327991900]
|
||||
process_mode = 1
|
||||
@@ -2523,4 +2524,7 @@ position = Vector2(8287, -2137.6895)
|
||||
[node name="Saw7" parent="." unique_id=908772956 instance=ExtResource("37_my276")]
|
||||
position = Vector2(8566, -2316.897)
|
||||
|
||||
[node name="HatPickup" parent="." unique_id=812970241 instance=ExtResource("38_yx0jh")]
|
||||
position = Vector2(-4677, 352.50708)
|
||||
|
||||
[connection signal="toggled" from="CanvasLayer/MusicButton" to="CanvasLayer/MusicButton" method="_on_toggled"]
|
||||
Reference in new issue
Block a user