better animations, individual tracks
This commit is contained in:
1 parent
7afda132ec
commit
06dc6d63b6
41 files changed
+795
-650
No files matched your search
@@ -0,0 +1,85 @@
|
||||
[gd_scene format=3 uid="uid://b3ytvnucd8hod"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://42h7vrqekyma" path="res://assets/symphonyguys.png" id="1_vbktj"]
|
||||
[ext_resource type="Script" uid="uid://djmn4qgj45j2p" path="res://scenes/musicians/musician.gd" id="2_fcial"]
|
||||
[ext_resource type="AudioStream" uid="uid://cc6smyxkrrvfr" path="res://assets/audio/eine-kleine-bass.wav" id="3_7duo6"]
|
||||
[ext_resource type="Texture2D" uid="uid://d1li1mlxutaym" path="res://resources/point_light_texture.tres" id="3_fcial"]
|
||||
[ext_resource type="PackedScene" uid="uid://cwdkw1p371bks" path="res://scenes/musicians/input_prompt.tscn" id="5_k304j"]
|
||||
[ext_resource type="Texture2D" uid="uid://bmc2ijkmfndv7" path="res://assets/input/keyboard_b_outline.png" id="6_5834n"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_lswn8"]
|
||||
atlas = ExtResource("1_vbktj")
|
||||
region = Rect2(32, 32, 32, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_a6jrf"]
|
||||
atlas = ExtResource("1_vbktj")
|
||||
region = Rect2(64, 32, 32, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_xuqvo"]
|
||||
atlas = ExtResource("1_vbktj")
|
||||
region = Rect2(96, 32, 32, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_qsp4k"]
|
||||
atlas = ExtResource("1_vbktj")
|
||||
region = Rect2(128, 32, 32, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_0odxb"]
|
||||
atlas = ExtResource("1_vbktj")
|
||||
region = Rect2(0, 32, 32, 32)
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_kq58d"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_lswn8")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_a6jrf")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_xuqvo")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_qsp4k")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_lswn8")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"default",
|
||||
"speed": 10.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_0odxb")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"idle",
|
||||
"speed": 12.0
|
||||
}]
|
||||
|
||||
[sub_resource type="OccluderPolygon2D" id="OccluderPolygon2D_efxa6"]
|
||||
polygon = PackedVector2Array(-2, 14, 4, 15, -4, 14)
|
||||
|
||||
[node name="Bass" type="AnimatedSprite2D" unique_id=1326988360]
|
||||
z_index = 10
|
||||
sprite_frames = SubResource("SpriteFrames_kq58d")
|
||||
script = ExtResource("2_fcial")
|
||||
|
||||
[node name="Audio" type="AudioStreamPlayer2D" parent="." unique_id=1607169101]
|
||||
stream = ExtResource("3_7duo6")
|
||||
|
||||
[node name="Light" type="PointLight2D" parent="." unique_id=1266087927]
|
||||
position = Vector2(9, 9)
|
||||
energy = 0.8
|
||||
shadow_enabled = true
|
||||
shadow_filter = 2
|
||||
shadow_filter_smooth = 7.6
|
||||
texture = ExtResource("3_fcial")
|
||||
|
||||
[node name="Occluder" type="LightOccluder2D" parent="." unique_id=968506542]
|
||||
position = Vector2(1, 0)
|
||||
occluder = SubResource("OccluderPolygon2D_efxa6")
|
||||
|
||||
[node name="InputPrompt" parent="." unique_id=590379112 instance=ExtResource("5_k304j")]
|
||||
texture = ExtResource("6_5834n")
|
||||
@@ -0,0 +1,79 @@
|
||||
[gd_scene format=3 uid="uid://ekd4tkk01nug"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://42h7vrqekyma" path="res://assets/symphonyguys.png" id="1_cwrgh"]
|
||||
[ext_resource type="Script" uid="uid://djmn4qgj45j2p" path="res://scenes/musicians/musician.gd" id="2_dthcw"]
|
||||
[ext_resource type="Texture2D" uid="uid://d1li1mlxutaym" path="res://resources/point_light_texture.tres" id="3_dthcw"]
|
||||
[ext_resource type="AudioStream" uid="uid://duovjdbif7wkw" path="res://assets/audio/eine-kleine-cello.wav" id="3_pmcee"]
|
||||
[ext_resource type="PackedScene" uid="uid://cwdkw1p371bks" path="res://scenes/musicians/input_prompt.tscn" id="5_ef0rn"]
|
||||
[ext_resource type="Texture2D" uid="uid://d1onhhk6xorit" path="res://assets/input/keyboard_c_outline.png" id="6_4j1rk"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_kek77"]
|
||||
atlas = ExtResource("1_cwrgh")
|
||||
region = Rect2(224, 32, 32, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_4c57u"]
|
||||
atlas = ExtResource("1_cwrgh")
|
||||
region = Rect2(256, 32, 32, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_efxa6"]
|
||||
atlas = ExtResource("1_cwrgh")
|
||||
region = Rect2(288, 32, 32, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_5vw27"]
|
||||
atlas = ExtResource("1_cwrgh")
|
||||
region = Rect2(192, 32, 32, 32)
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_dg77c"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_kek77")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_4c57u")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_efxa6")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_kek77")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"default",
|
||||
"speed": 8.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_5vw27")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"idle",
|
||||
"speed": 10.0
|
||||
}]
|
||||
|
||||
[sub_resource type="OccluderPolygon2D" id="OccluderPolygon2D_dg77c"]
|
||||
polygon = PackedVector2Array(-1, 13, 2, 14, -2, 15)
|
||||
|
||||
[node name="Cello" type="AnimatedSprite2D" unique_id=1539517068]
|
||||
sprite_frames = SubResource("SpriteFrames_dg77c")
|
||||
autoplay = "idle"
|
||||
flip_h = true
|
||||
script = ExtResource("2_dthcw")
|
||||
|
||||
[node name="Audio" type="AudioStreamPlayer2D" parent="." unique_id=1212448009]
|
||||
stream = ExtResource("3_pmcee")
|
||||
|
||||
[node name="Light" type="PointLight2D" parent="." unique_id=822750253]
|
||||
position = Vector2(6, 9)
|
||||
energy = 0.8
|
||||
shadow_enabled = true
|
||||
shadow_filter = 2
|
||||
shadow_filter_smooth = 7.6
|
||||
texture = ExtResource("3_dthcw")
|
||||
|
||||
[node name="Occluder" type="LightOccluder2D" parent="." unique_id=1218678921]
|
||||
position = Vector2(1, 0)
|
||||
occluder = SubResource("OccluderPolygon2D_dg77c")
|
||||
|
||||
[node name="InputPrompt" parent="." unique_id=590379112 instance=ExtResource("5_ef0rn")]
|
||||
texture = ExtResource("6_4j1rk")
|
||||
@@ -0,0 +1,8 @@
|
||||
[gd_scene format=3 uid="uid://cwdkw1p371bks"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://cctoyonq28i8q" path="res://assets/input/keyboard_v_outline.png" id="1_tpl0e"]
|
||||
|
||||
[node name="InputPrompt" type="Sprite2D" unique_id=590379112]
|
||||
position = Vector2(0, 24)
|
||||
scale = Vector2(0.25, 0.25)
|
||||
texture = ExtResource("1_tpl0e")
|
||||
@@ -0,0 +1,46 @@
|
||||
#@tool
|
||||
#@icon(icon_path: String)
|
||||
class_name Musician
|
||||
extends AnimatedSprite2D
|
||||
## Documentation comments
|
||||
|
||||
# signal
|
||||
# enum
|
||||
# const
|
||||
# @export var
|
||||
var is_active: bool = false
|
||||
|
||||
@onready var audio: AudioStreamPlayer2D = $Audio
|
||||
@onready var light: PointLight2D = $Light
|
||||
@onready var occluder: LightOccluder2D = $Occluder
|
||||
|
||||
## OVERRIDES
|
||||
|
||||
func _ready() -> void:
|
||||
light.visible = false
|
||||
audio.connect("finished", enter_exit)
|
||||
|
||||
func _process(_delta: float) -> void:
|
||||
pass
|
||||
|
||||
func _physics_process(_delta: float) -> void:
|
||||
pass
|
||||
|
||||
## CORE
|
||||
func enter_exit() -> void:
|
||||
if is_active:
|
||||
play("idle")
|
||||
audio.stop()
|
||||
light.visible = false
|
||||
is_active = false
|
||||
else:
|
||||
play("default")
|
||||
audio.play()
|
||||
light.visible = true
|
||||
is_active = true
|
||||
|
||||
## PRIVATE/HELPER
|
||||
|
||||
## RECEIVERS
|
||||
|
||||
## SETTERS/GETTERS
|
||||
@@ -0,0 +1 @@
|
||||
uid://djmn4qgj45j2p
|
||||
@@ -0,0 +1,84 @@
|
||||
[gd_scene format=3 uid="uid://c5mms8bhjkplb"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://42h7vrqekyma" path="res://assets/symphonyguys.png" id="1_j3j2n"]
|
||||
[ext_resource type="Script" uid="uid://djmn4qgj45j2p" path="res://scenes/musicians/musician.gd" id="2_ijwrm"]
|
||||
[ext_resource type="AudioStream" uid="uid://bd01iv6fpqbdh" path="res://assets/audio/eine-kleine-viol.wav" id="3_atj5b"]
|
||||
[ext_resource type="Texture2D" uid="uid://d1li1mlxutaym" path="res://resources/point_light_texture.tres" id="3_ijwrm"]
|
||||
[ext_resource type="PackedScene" uid="uid://cwdkw1p371bks" path="res://scenes/musicians/input_prompt.tscn" id="5_u4mvl"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_w48qg"]
|
||||
atlas = ExtResource("1_j3j2n")
|
||||
region = Rect2(32, 160, 32, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_vivmo"]
|
||||
atlas = ExtResource("1_j3j2n")
|
||||
region = Rect2(64, 160, 32, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_2cqfq"]
|
||||
atlas = ExtResource("1_j3j2n")
|
||||
region = Rect2(96, 160, 32, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_yaehf"]
|
||||
atlas = ExtResource("1_j3j2n")
|
||||
region = Rect2(128, 160, 32, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_ycdy4"]
|
||||
atlas = ExtResource("1_j3j2n")
|
||||
region = Rect2(0, 160, 32, 32)
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_074og"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_w48qg")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_vivmo")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_2cqfq")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_yaehf")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_w48qg")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"default",
|
||||
"speed": 15.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_ycdy4")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"idle",
|
||||
"speed": 12.0
|
||||
}]
|
||||
|
||||
[sub_resource type="OccluderPolygon2D" id="OccluderPolygon2D_ycdy4"]
|
||||
polygon = PackedVector2Array(0, 13, 3, 13, -1, 14)
|
||||
|
||||
[node name="Viol" type="AnimatedSprite2D" unique_id=173609985]
|
||||
sprite_frames = SubResource("SpriteFrames_074og")
|
||||
autoplay = "idle"
|
||||
script = ExtResource("2_ijwrm")
|
||||
|
||||
[node name="Audio" type="AudioStreamPlayer2D" parent="." unique_id=734284253]
|
||||
stream = ExtResource("3_atj5b")
|
||||
|
||||
[node name="Light" type="PointLight2D" parent="." unique_id=2065896281]
|
||||
z_index = 100
|
||||
position = Vector2(7, 8)
|
||||
energy = 0.8
|
||||
shadow_enabled = true
|
||||
shadow_filter = 2
|
||||
shadow_filter_smooth = 7.6
|
||||
texture = ExtResource("3_ijwrm")
|
||||
|
||||
[node name="Occluder" type="LightOccluder2D" parent="." unique_id=1033753770]
|
||||
position = Vector2(1, 0)
|
||||
occluder = SubResource("OccluderPolygon2D_ycdy4")
|
||||
|
||||
[node name="InputPrompt" parent="." unique_id=590379112 instance=ExtResource("5_u4mvl")]
|
||||
Reference in new issue
Block a user