test
This commit is contained in:
Binary file not shown.
@@ -0,0 +1,19 @@
|
||||
[remap]
|
||||
|
||||
importer="mp3"
|
||||
type="AudioStreamMP3"
|
||||
uid="uid://dw00kc3yup8bh"
|
||||
path="res://.godot/imported/52ac54_super_mario_bros_stage_clear_sound_effect.mp3-cea1e164d9781cd3f06affa23092f4f3.mp3str"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sounds/52ac54_super_mario_bros_stage_clear_sound_effect.mp3"
|
||||
dest_files=["res://.godot/imported/52ac54_super_mario_bros_stage_clear_sound_effect.mp3-cea1e164d9781cd3f06affa23092f4f3.mp3str"]
|
||||
|
||||
[params]
|
||||
|
||||
loop=false
|
||||
loop_offset=0
|
||||
bpm=0
|
||||
beat_count=0
|
||||
bar_beats=4
|
||||
+35
-5
@@ -1,14 +1,14 @@
|
||||
[gd_scene load_steps=6 format=3 uid="uid://bm04qp5vgbi10"]
|
||||
[gd_scene load_steps=7 format=3 uid="uid://bm04qp5vgbi10"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/Flag.gd" id="1_3p67j"]
|
||||
[ext_resource type="PackedScene" uid="uid://c0r61y2b3pt4m" path="res://scenes/levels/level_2.tscn" id="2_u50ce"]
|
||||
[ext_resource type="AudioStream" uid="uid://dw00kc3yup8bh" path="res://assets/sounds/52ac54_super_mario_bros_stage_clear_sound_effect.mp3" id="2_4f78k"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_ihwdr"]
|
||||
size = Vector2(6, 201)
|
||||
|
||||
[sub_resource type="Animation" id="Animation_ivwqs"]
|
||||
resource_name = "change_scene"
|
||||
length = 4.0
|
||||
length = 6.0
|
||||
tracks/0/type = "method"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
@@ -16,16 +16,44 @@ tracks/0/path = NodePath(".")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(4),
|
||||
"times": PackedFloat32Array(6),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"values": [{
|
||||
"args": [],
|
||||
"method": &"load_new_scene"
|
||||
}]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("AudioStreamPlayer:playing")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [true]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_ufkda"]
|
||||
length = 0.001
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("AudioStreamPlayer:playing")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [false]
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_adywb"]
|
||||
_data = {
|
||||
"RESET": SubResource("Animation_ufkda"),
|
||||
"change_scene": SubResource("Animation_ivwqs")
|
||||
}
|
||||
|
||||
@@ -34,7 +62,6 @@ position = Vector2(3176, -19)
|
||||
collision_layer = 32769
|
||||
collision_mask = 2
|
||||
script = ExtResource("1_3p67j")
|
||||
load_level = ExtResource("2_u50ce")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
position = Vector2(0, -98.5)
|
||||
@@ -45,4 +72,7 @@ libraries = {
|
||||
"": SubResource("AnimationLibrary_adywb")
|
||||
}
|
||||
|
||||
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."]
|
||||
stream = ExtResource("2_4f78k")
|
||||
|
||||
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
|
||||
|
||||
@@ -3,11 +3,14 @@ extends Area2D
|
||||
@export var load_level: String
|
||||
@onready var animation_player = $AnimationPlayer
|
||||
@onready var player = %player
|
||||
@onready var audio_stream_player = $AudioStreamPlayer
|
||||
@onready var music = %Music
|
||||
|
||||
|
||||
func _on_body_entered(body):
|
||||
animation_player.play("change_scene")
|
||||
player.on_pause = true
|
||||
music.stop()
|
||||
|
||||
func load_new_scene():
|
||||
get_tree().change_scene_to_file("res://scenes/levels/" + load_level + ".tscn")
|
||||
|
||||
@@ -80,8 +80,8 @@ func f_shrink(body):
|
||||
die_sound.play()
|
||||
if not is_down:
|
||||
speed = 0
|
||||
collision_shape_2d.shape.height -= 9
|
||||
die.position.y += 2
|
||||
#collision_shape_2d.shape.height -= 9
|
||||
#die.position.y += 2
|
||||
animated_sprite_2d.play("shrink")
|
||||
is_down = true
|
||||
elif speed == 0:
|
||||
|
||||
Reference in New Issue
Block a user