changed structure to make musician scenes inherit a common parent
This commit is contained in:
1 parent
06dc6d63b6
commit
158339d042
21 files changed
+397
-391
No files matched your search
@@ -1,85 +0,0 @@
|
||||
[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,21 @@
|
||||
[gd_scene format=3 uid="uid://dshpa8es6dcv5"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://c1tceq1kcqngi" path="res://scenes/musicians/musician.tscn" id="1_ec361"]
|
||||
[ext_resource type="SpriteFrames" uid="uid://c34ha4ekm1xor" path="res://resources/sprite_frames/bass_sprite_frames.tres" id="2_58d2m"]
|
||||
[ext_resource type="Texture2D" uid="uid://bw3nb0oru0pam" path="res://assets/input/keyboard_b.png" id="3_qpy72"]
|
||||
[ext_resource type="Texture2D" uid="uid://bmc2ijkmfndv7" path="res://assets/input/keyboard_b_outline.png" id="4_5nfdv"]
|
||||
[ext_resource type="AudioStream" uid="uid://cc6smyxkrrvfr" path="res://assets/audio/eine-kleine-bass.wav" id="5_58d2m"]
|
||||
|
||||
[sub_resource type="OccluderPolygon2D" id="OccluderPolygon2D_58d2m"]
|
||||
polygon = PackedVector2Array(-2, 14, 2, 14, 3, 15)
|
||||
|
||||
[node name="Bassist" unique_id=233159387 instance=ExtResource("1_ec361")]
|
||||
sprite_frames = ExtResource("2_58d2m")
|
||||
solid_texture = ExtResource("3_qpy72")
|
||||
outline_texture = ExtResource("4_5nfdv")
|
||||
|
||||
[node name="Audio" parent="." index="0" unique_id=1183742914]
|
||||
stream = ExtResource("5_58d2m")
|
||||
|
||||
[node name="Occluder" parent="." index="2" unique_id=807216766]
|
||||
occluder = SubResource("OccluderPolygon2D_58d2m")
|
||||
@@ -0,0 +1,21 @@
|
||||
[gd_scene format=3 uid="uid://cnf35r3d7v1ij"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://c1tceq1kcqngi" path="res://scenes/musicians/musician.tscn" id="1_gkxwc"]
|
||||
[ext_resource type="SpriteFrames" uid="uid://bpfq0ubeyinny" path="res://resources/sprite_frames/cello_sprite_frames.tres" id="2_3cfa0"]
|
||||
[ext_resource type="Texture2D" uid="uid://dahurq3y0kh20" path="res://assets/input/keyboard_c.png" id="3_vjovb"]
|
||||
[ext_resource type="Texture2D" uid="uid://d1onhhk6xorit" path="res://assets/input/keyboard_c_outline.png" id="4_vmq6l"]
|
||||
[ext_resource type="AudioStream" uid="uid://duovjdbif7wkw" path="res://assets/audio/eine-kleine-cello.wav" id="5_vjovb"]
|
||||
|
||||
[sub_resource type="OccluderPolygon2D" id="OccluderPolygon2D_vjovb"]
|
||||
polygon = PackedVector2Array(-4, 13, -1, 13, 0, 14)
|
||||
|
||||
[node name="Cellist" unique_id=233159387 instance=ExtResource("1_gkxwc")]
|
||||
sprite_frames = ExtResource("2_3cfa0")
|
||||
solid_texture = ExtResource("3_vjovb")
|
||||
outline_texture = ExtResource("4_vmq6l")
|
||||
|
||||
[node name="Audio" parent="." index="0" unique_id=1183742914]
|
||||
stream = ExtResource("5_vjovb")
|
||||
|
||||
[node name="Occluder" parent="." index="2" unique_id=807216766]
|
||||
occluder = SubResource("OccluderPolygon2D_vjovb")
|
||||
@@ -1,79 +0,0 @@
|
||||
[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,21 @@
|
||||
[gd_scene format=3 uid="uid://drwm126itwavd"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://c1tceq1kcqngi" path="res://scenes/musicians/musician.tscn" id="1_td0jb"]
|
||||
[ext_resource type="SpriteFrames" uid="uid://brmhup007maeh" path="res://resources/sprite_frames/conductor_sprite_frames.tres" id="2_lajfc"]
|
||||
[ext_resource type="Texture2D" uid="uid://bcw48038qg8od" path="res://assets/input/keyboard_r.png" id="3_lajfc"]
|
||||
[ext_resource type="Texture2D" uid="uid://do6jqp2l6nmwm" path="res://assets/input/keyboard_r_outline.png" id="4_grljo"]
|
||||
[ext_resource type="AudioStream" uid="uid://b8n6p428csquv" path="res://assets/audio/eine-kleine-click.wav" id="5_grljo"]
|
||||
|
||||
[sub_resource type="OccluderPolygon2D" id="OccluderPolygon2D_lajfc"]
|
||||
polygon = PackedVector2Array(-4, 15, -2, 14, 0, 14)
|
||||
|
||||
[node name="Conductor" unique_id=233159387 instance=ExtResource("1_td0jb")]
|
||||
sprite_frames = ExtResource("2_lajfc")
|
||||
solid_texture = ExtResource("3_lajfc")
|
||||
outline_texture = ExtResource("4_grljo")
|
||||
|
||||
[node name="Audio" parent="." index="0" unique_id=1183742914]
|
||||
stream = ExtResource("5_grljo")
|
||||
|
||||
[node name="Occluder" parent="." index="2" unique_id=807216766]
|
||||
occluder = SubResource("OccluderPolygon2D_lajfc")
|
||||
@@ -1,8 +0,0 @@
|
||||
[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")
|
||||
@@ -1,46 +0,0 @@
|
||||
#@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
|
||||
@@ -1 +0,0 @@
|
||||
uid://djmn4qgj45j2p
|
||||
@@ -0,0 +1,22 @@
|
||||
[gd_scene format=3 uid="uid://c1tceq1kcqngi"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://djmn4qgj45j2p" path="res://scripts/musician.gd" id="1_ksqn6"]
|
||||
[ext_resource type="PackedScene" uid="uid://cwdkw1p371bks" path="res://scenes/input_prompt.tscn" id="3_6yfn3"]
|
||||
[ext_resource type="PackedScene" uid="uid://ckx47081eegis" path="res://scenes/light.tscn" id="3_svwww"]
|
||||
|
||||
[node name="Musician" type="AnimatedSprite2D" unique_id=233159387]
|
||||
script = ExtResource("1_ksqn6")
|
||||
|
||||
[node name="Audio" type="AudioStreamPlayer2D" parent="." unique_id=1183742914]
|
||||
unique_name_in_owner = true
|
||||
autoplay = true
|
||||
|
||||
[node name="Light" parent="." unique_id=428469575 instance=ExtResource("3_svwww")]
|
||||
unique_name_in_owner = true
|
||||
|
||||
[node name="Occluder" type="LightOccluder2D" parent="." unique_id=807216766]
|
||||
unique_name_in_owner = true
|
||||
|
||||
[node name="InputPrompt" parent="." unique_id=590379112 instance=ExtResource("3_6yfn3")]
|
||||
unique_name_in_owner = true
|
||||
light_mask = 0
|
||||
@@ -1,84 +0,0 @@
|
||||
[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")]
|
||||
@@ -0,0 +1,21 @@
|
||||
[gd_scene format=3 uid="uid://d2f7skasc4as7"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://c1tceq1kcqngi" path="res://scenes/musicians/musician.tscn" id="1_bgcse"]
|
||||
[ext_resource type="SpriteFrames" uid="uid://bkq7b1w5jh1ec" path="res://resources/sprite_frames/viol_sprite_frames.tres" id="2_pec4u"]
|
||||
[ext_resource type="Texture2D" uid="uid://bm53tpx7cbocx" path="res://assets/input/keyboard_v.png" id="3_4d75b"]
|
||||
[ext_resource type="Texture2D" uid="uid://cctoyonq28i8q" path="res://assets/input/keyboard_v_outline.png" id="4_noys6"]
|
||||
[ext_resource type="AudioStream" uid="uid://bd01iv6fpqbdh" path="res://assets/audio/eine-kleine-viol.wav" id="5_pec4u"]
|
||||
|
||||
[sub_resource type="OccluderPolygon2D" id="OccluderPolygon2D_pec4u"]
|
||||
polygon = PackedVector2Array(0, 14, 2, 13, 4, 13)
|
||||
|
||||
[node name="Violinist" unique_id=233159387 instance=ExtResource("1_bgcse")]
|
||||
sprite_frames = ExtResource("2_pec4u")
|
||||
solid_texture = ExtResource("3_4d75b")
|
||||
outline_texture = ExtResource("4_noys6")
|
||||
|
||||
[node name="Audio" parent="." index="0" unique_id=1183742914]
|
||||
stream = ExtResource("5_pec4u")
|
||||
|
||||
[node name="Occluder" parent="." index="2" unique_id=807216766]
|
||||
occluder = SubResource("OccluderPolygon2D_pec4u")
|
||||
Reference in new issue
Block a user