Refactor rhythm action architecture
This commit is contained in:
@@ -1,338 +1,8 @@
|
||||
extends Node2D
|
||||
|
||||
@onready var rhythm_conductor: Node = $RhythmConductor
|
||||
@onready var rhythm_track: Control = $RhythmFeedback/RhythmTrack
|
||||
@onready var rhythm_feedback_label: Label = $RhythmFeedback/JudgementLabel
|
||||
@onready var player: Node = $Player
|
||||
@onready var center_base: TextureRect = $RhythmFeedback/RhythmTrack/CenterBase
|
||||
@onready var center_flash: TextureRect = $RhythmFeedback/RhythmTrack/CenterFlash
|
||||
@onready var left_mover: TextureRect = $RhythmFeedback/RhythmTrack/LeftMover
|
||||
@onready var right_mover: TextureRect = $RhythmFeedback/RhythmTrack/RightMover
|
||||
@onready var combo_skill_label: Label = $RhythmFeedback/ComboSkillLabel
|
||||
@onready var health_bar: ProgressBar = $RhythmFeedback/StatusBars/HealthBar
|
||||
@onready var charge_bar: ProgressBar = $RhythmFeedback/StatusBars/ChargeBar
|
||||
@onready var energy_segments: Array[Panel] = [
|
||||
$RhythmFeedback/StatusBars/EnergyBar/Segment0,
|
||||
$RhythmFeedback/StatusBars/EnergyBar/Segment1,
|
||||
$RhythmFeedback/StatusBars/EnergyBar/Segment2,
|
||||
$RhythmFeedback/StatusBars/EnergyBar/Segment3,
|
||||
$RhythmFeedback/StatusBars/EnergyBar/Segment4,
|
||||
$RhythmFeedback/StatusBars/EnergyBar/Segment5,
|
||||
$RhythmFeedback/StatusBars/EnergyBar/Segment6,
|
||||
$RhythmFeedback/StatusBars/EnergyBar/Segment7,
|
||||
$RhythmFeedback/StatusBars/EnergyBar/Segment8,
|
||||
$RhythmFeedback/StatusBars/EnergyBar/Segment9,
|
||||
]
|
||||
@onready var combo_slot_panels: Array[PanelContainer] = [
|
||||
$RhythmFeedback/ComboWindow/Slot0,
|
||||
$RhythmFeedback/ComboWindow/Slot1,
|
||||
$RhythmFeedback/ComboWindow/Slot2,
|
||||
$RhythmFeedback/ComboWindow/Slot3,
|
||||
]
|
||||
@onready var combo_key_labels: Array[Label] = [
|
||||
$RhythmFeedback/ComboWindow/Slot0/Key,
|
||||
$RhythmFeedback/ComboWindow/Slot1/Key,
|
||||
$RhythmFeedback/ComboWindow/Slot2/Key,
|
||||
$RhythmFeedback/ComboWindow/Slot3/Key,
|
||||
]
|
||||
|
||||
var combo_clear_tween: Tween
|
||||
var combo_clear_flash := 0.0
|
||||
var charge_bar_ready := false
|
||||
var charge_flash := 0.0
|
||||
|
||||
var track_center := Vector2.ZERO
|
||||
var left_mover_start := Vector2.ZERO
|
||||
var right_mover_start := Vector2.ZERO
|
||||
var mover_size := Vector2.ZERO
|
||||
var center_flash_size := Vector2.ZERO
|
||||
var feedback_flash := 0.0
|
||||
var beat_flash := 0.0
|
||||
@onready var stage: Node = $Stage
|
||||
@onready var ui: CanvasLayer = $UI
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
_cache_rhythm_track_layout()
|
||||
rhythm_conductor.action_judged.connect(_on_rhythm_action_judged)
|
||||
rhythm_conductor.beat.connect(_on_rhythm_beat)
|
||||
if player.has_signal("combo_window_changed"):
|
||||
player.connect("combo_window_changed", _on_combo_window_changed)
|
||||
if player.has_signal("combo_window_cleared"):
|
||||
player.connect("combo_window_cleared", _on_combo_window_cleared)
|
||||
if player.has_signal("skill_requested"):
|
||||
player.connect("skill_requested", _on_skill_requested)
|
||||
if player.has_signal("energy_changed"):
|
||||
player.connect("energy_changed", _on_energy_changed)
|
||||
if player.has_signal("health_changed"):
|
||||
player.connect("health_changed", _on_health_changed)
|
||||
if player.has_signal("charge_changed"):
|
||||
player.connect("charge_changed", _on_charge_changed)
|
||||
rhythm_feedback_label.text = "READY"
|
||||
_on_combo_window_changed([])
|
||||
if player.has_method("get_energy") and player.has_method("get_max_energy"):
|
||||
_on_energy_changed(player.call("get_energy"), player.call("get_max_energy"))
|
||||
if player.has_method("get_health") and player.has_method("get_max_health"):
|
||||
_on_health_changed(player.call("get_health"), player.call("get_max_health"))
|
||||
if player.has_method("get_charge") and player.has_method("get_max_charge") and player.has_method("is_charge_ready") and player.has_method("is_charge_active"):
|
||||
_on_charge_changed(player.call("get_charge"), player.call("get_max_charge"), player.call("is_charge_ready"), player.call("is_charge_active"))
|
||||
_update_rhythm_track(0.0)
|
||||
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
_update_rhythm_track(delta)
|
||||
_update_combo_clear_animation(delta)
|
||||
_update_charge_bar_flash(delta)
|
||||
if feedback_flash > 0.0:
|
||||
feedback_flash = maxf(0.0, feedback_flash - delta * 4.0)
|
||||
rhythm_feedback_label.scale = Vector2.ONE * (1.0 + feedback_flash * 0.18)
|
||||
|
||||
|
||||
func _on_rhythm_action_judged(action_name: String, rating: Dictionary) -> void:
|
||||
var rating_name: String = str(rating.get("label", "miss"))
|
||||
var color: Color = rating.get("color", Color("ff0055")) as Color
|
||||
var diff: float = float(rating.get("diff", INF))
|
||||
|
||||
rhythm_feedback_label.text = "%s %s %s" % [
|
||||
_format_action_name(action_name),
|
||||
rating_name.to_upper(),
|
||||
_format_signed_ms(diff),
|
||||
]
|
||||
rhythm_feedback_label.modulate = color
|
||||
feedback_flash = 1.0
|
||||
|
||||
|
||||
func _on_rhythm_beat(_position: int) -> void:
|
||||
beat_flash = 1.0
|
||||
|
||||
|
||||
func _on_combo_window_changed(slots: Array) -> void:
|
||||
for index: int in range(combo_key_labels.size()):
|
||||
var filled := index < slots.size()
|
||||
var label := combo_key_labels[index]
|
||||
var panel := combo_slot_panels[index]
|
||||
label.text = str(slots[index]) if filled else "·"
|
||||
label.modulate = Color(1.0, 1.0, 1.0, 1.0 if filled else 0.32)
|
||||
panel.modulate = Color(1.0, 1.0, 1.0, 1.0 if filled else 0.48)
|
||||
if filled:
|
||||
_pulse_combo_slot(panel)
|
||||
|
||||
|
||||
func _on_combo_window_cleared(_reason: String) -> void:
|
||||
_play_combo_clear_animation()
|
||||
|
||||
|
||||
func _on_skill_requested(skill_id: String) -> void:
|
||||
combo_skill_label.text = _format_skill_name(skill_id)
|
||||
|
||||
|
||||
func _on_energy_changed(current: int, maximum: int) -> void:
|
||||
var filled_segments := clampi(current, 0, min(maximum, energy_segments.size()))
|
||||
for index: int in range(energy_segments.size()):
|
||||
var filled := index < filled_segments
|
||||
var panel := energy_segments[index]
|
||||
panel.modulate = Color(1.0, 1.0, 1.0, 1.0 if filled else 0.38)
|
||||
|
||||
|
||||
func _on_health_changed(current: int, maximum: int) -> void:
|
||||
health_bar.max_value = max(1, maximum)
|
||||
health_bar.value = clampi(current, 0, maximum)
|
||||
|
||||
|
||||
func _on_charge_changed(current: float, maximum: float, ready: bool, active: bool) -> void:
|
||||
charge_bar.max_value = maxf(0.01, maximum)
|
||||
charge_bar.value = clampf(current, 0.0, maximum)
|
||||
charge_bar_ready = ready and active
|
||||
if charge_bar_ready:
|
||||
return
|
||||
charge_bar.modulate = Color(1.0, 1.0, 1.0, 1.0 if active or current > 0.0 else 0.45)
|
||||
|
||||
|
||||
func _update_charge_bar_flash(delta: float) -> void:
|
||||
if not charge_bar_ready:
|
||||
charge_flash = 0.0
|
||||
return
|
||||
charge_flash = fmod(charge_flash + delta * 7.0, TAU)
|
||||
var alpha := 0.62 + 0.38 * absf(sin(charge_flash))
|
||||
charge_bar.modulate = Color(1.0, 1.0, 1.0, alpha)
|
||||
|
||||
|
||||
func _play_combo_clear_animation() -> void:
|
||||
if combo_clear_tween != null and combo_clear_tween.is_valid():
|
||||
combo_clear_tween.kill()
|
||||
combo_clear_flash = 1.0
|
||||
for panel: PanelContainer in combo_slot_panels:
|
||||
panel.scale = Vector2(1.16, 1.16)
|
||||
panel.modulate = Color(1.0, 1.0, 1.0, 1.0)
|
||||
|
||||
|
||||
func _update_combo_clear_animation(delta: float) -> void:
|
||||
if combo_clear_flash <= 0.0:
|
||||
return
|
||||
combo_clear_flash = maxf(0.0, combo_clear_flash - delta * 5.0)
|
||||
var eased := combo_clear_flash * combo_clear_flash
|
||||
for panel: PanelContainer in combo_slot_panels:
|
||||
panel.scale = Vector2.ONE * (1.0 + 0.16 * eased)
|
||||
panel.modulate = Color(1.0, 1.0, 1.0, 0.48 + 0.52 * eased)
|
||||
if combo_clear_flash <= 0.0:
|
||||
_restore_empty_combo_slots()
|
||||
|
||||
|
||||
func _pulse_combo_slot(panel: PanelContainer) -> void:
|
||||
var tween := create_tween()
|
||||
panel.scale = Vector2(1.08, 1.08)
|
||||
tween.tween_property(panel, "scale", Vector2.ONE, 0.09)
|
||||
|
||||
|
||||
func _restore_empty_combo_slots() -> void:
|
||||
for index: int in range(combo_slot_panels.size()):
|
||||
combo_slot_panels[index].modulate = Color(1.0, 1.0, 1.0, 0.48)
|
||||
combo_slot_panels[index].scale = Vector2.ONE
|
||||
combo_key_labels[index].text = "·"
|
||||
combo_key_labels[index].modulate = Color(1.0, 1.0, 1.0, 0.32)
|
||||
|
||||
|
||||
func _update_rhythm_track(delta: float) -> void:
|
||||
beat_flash = maxf(0.0, beat_flash - delta * 8.0)
|
||||
var progress := 0.0
|
||||
if rhythm_conductor.has_method("get_current_beat_progress"):
|
||||
progress = float(rhythm_conductor.call("get_current_beat_progress"))
|
||||
if beat_flash > 0.15:
|
||||
progress = 1.0
|
||||
|
||||
_set_control_center(left_mover, left_mover_start.lerp(track_center, progress), mover_size)
|
||||
_set_control_center(right_mover, right_mover_start.lerp(track_center, progress), mover_size)
|
||||
_set_control_center(center_flash, track_center, center_flash_size)
|
||||
center_flash.modulate = Color(1.0, 1.0, 1.0, beat_flash)
|
||||
|
||||
|
||||
func _cache_rhythm_track_layout() -> void:
|
||||
track_center = _control_center(center_base)
|
||||
left_mover_start = _control_center(left_mover)
|
||||
right_mover_start = _control_center(right_mover)
|
||||
mover_size = left_mover.size
|
||||
center_flash_size = center_flash.size
|
||||
|
||||
|
||||
func _control_center(control: Control) -> Vector2:
|
||||
return Vector2(
|
||||
(control.offset_left + control.offset_right) * 0.5,
|
||||
(control.offset_top + control.offset_bottom) * 0.5
|
||||
)
|
||||
|
||||
|
||||
func _set_control_center(control: Control, center: Vector2, size: Vector2) -> void:
|
||||
control.offset_left = center.x - size.x * 0.5
|
||||
control.offset_top = center.y - size.y * 0.5
|
||||
control.offset_right = center.x + size.x * 0.5
|
||||
control.offset_bottom = center.y + size.y * 0.5
|
||||
|
||||
|
||||
func _format_action_name(action_name: String) -> String:
|
||||
match action_name:
|
||||
"w":
|
||||
return "W"
|
||||
"a":
|
||||
return "A"
|
||||
"d":
|
||||
return "D"
|
||||
"s":
|
||||
return "S"
|
||||
"space":
|
||||
return "SP"
|
||||
"skill_w":
|
||||
return "W"
|
||||
"skill_wa":
|
||||
return "W+A"
|
||||
"skill_wd":
|
||||
return "W+D"
|
||||
"skill_s":
|
||||
return "S"
|
||||
"skill_a":
|
||||
return "A"
|
||||
"skill_d":
|
||||
return "D"
|
||||
"skill_aa":
|
||||
return "A+A"
|
||||
"skill_dd":
|
||||
return "D+D"
|
||||
"skill_aaa":
|
||||
return "A+A+A"
|
||||
"skill_ddd":
|
||||
return "D+D+D"
|
||||
"skill_a_space":
|
||||
return "A+SP"
|
||||
"skill_d_space":
|
||||
return "D+SP"
|
||||
"skill_a_space_space":
|
||||
return "A+SP+SP"
|
||||
"skill_d_space_space":
|
||||
return "D+SP+SP"
|
||||
"skill_aa_space":
|
||||
return "A+A+SP"
|
||||
"skill_ad_space":
|
||||
return "A+D+SP"
|
||||
"skill_da_space":
|
||||
return "D+A+SP"
|
||||
"skill_dd_space":
|
||||
return "D+D+SP"
|
||||
"skill_s_projectile_1":
|
||||
return "S+SP"
|
||||
"skill_s_projectile_2":
|
||||
return "S+SP+SP"
|
||||
"skill_s_projectile_3":
|
||||
return "S+SP+SP+SP"
|
||||
_:
|
||||
return action_name.to_upper()
|
||||
|
||||
|
||||
func _format_skill_name(skill_id: String) -> String:
|
||||
match skill_id:
|
||||
"skill_w":
|
||||
return "W"
|
||||
"skill_wa":
|
||||
return "W+A"
|
||||
"skill_wd":
|
||||
return "W+D"
|
||||
"skill_s":
|
||||
return "S"
|
||||
"skill_a":
|
||||
return "A"
|
||||
"skill_d":
|
||||
return "D"
|
||||
"skill_aa":
|
||||
return "A+A"
|
||||
"skill_dd":
|
||||
return "D+D"
|
||||
"skill_aaa":
|
||||
return "A+A+A"
|
||||
"skill_ddd":
|
||||
return "D+D+D"
|
||||
"skill_a_space":
|
||||
return "A+SP"
|
||||
"skill_d_space":
|
||||
return "D+SP"
|
||||
"skill_a_space_space":
|
||||
return "A+SP+SP"
|
||||
"skill_d_space_space":
|
||||
return "D+SP+SP"
|
||||
"skill_aa_space":
|
||||
return "A+A+SP"
|
||||
"skill_ad_space":
|
||||
return "A+D+SP"
|
||||
"skill_da_space":
|
||||
return "D+A+SP"
|
||||
"skill_dd_space":
|
||||
return "D+D+SP"
|
||||
"skill_s_projectile_1":
|
||||
return "S+SP"
|
||||
"skill_s_projectile_2":
|
||||
return "S+SP+SP"
|
||||
"skill_s_projectile_3":
|
||||
return "S+SP+SP+SP"
|
||||
_:
|
||||
return skill_id.to_upper()
|
||||
|
||||
|
||||
func _format_signed_ms(seconds: float) -> String:
|
||||
if is_inf(seconds):
|
||||
return "-- ms"
|
||||
return "%+.0f ms" % (seconds * 1000.0)
|
||||
func get_player() -> Node:
|
||||
return stage.get_node("ActorsContainer/Player")
|
||||
|
||||
@@ -1,550 +1,16 @@
|
||||
[gd_scene format=3 uid="uid://brx0c2va3831p"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://cs0rhloanh2u4" path="res://scenes/ground/ground.tscn" id="1_ground"]
|
||||
[ext_resource type="PackedScene" uid="uid://cs3s5wy1melul" path="res://scenes/characters/player.tscn" id="2_player"]
|
||||
[ext_resource type="Script" uid="uid://3n4nkejauoim" path="res://scenes/main/main.gd" id="3_main_script"]
|
||||
[ext_resource type="Script" uid="uid://brh83qp8flq5u" path="res://scenes/rhythm/rhythm_conductor.gd" id="4_rhythm_script"]
|
||||
[ext_resource type="AudioStream" uid="uid://di5ceecn088rk" path="res://assets/audio/song.ogg" id="5_song"]
|
||||
[ext_resource type="Texture2D" uid="uid://brqr1gyyxth8p" path="res://assets/ui/rhythm/center.png" id="6_center"]
|
||||
[ext_resource type="Texture2D" uid="uid://bkqec7mh5yfrd" path="res://assets/ui/rhythm/center_flash.png" id="7_center_flash"]
|
||||
[ext_resource type="Texture2D" uid="uid://cj5pa4c3arevn" path="res://assets/ui/rhythm/rod.png" id="8_rod"]
|
||||
[ext_resource type="Texture2D" uid="uid://dbmdivnpjf48l" path="res://assets/ui/rhythm/blue_ball.png" id="9_blue_ball"]
|
||||
[ext_resource type="Texture2D" uid="uid://ewr8k3lwpcna" path="res://assets/ui/rhythm/yellow_ball.png" id="10_yellow_ball"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_a8run"]
|
||||
content_margin_left = 6.0
|
||||
content_margin_top = 4.0
|
||||
content_margin_right = 6.0
|
||||
content_margin_bottom = 4.0
|
||||
bg_color = Color(0.04, 0.07, 0.09, 0.82)
|
||||
border_width_left = 2
|
||||
border_width_top = 2
|
||||
border_width_right = 2
|
||||
border_width_bottom = 2
|
||||
border_color = Color(0.43, 0.78, 0.88, 0.95)
|
||||
corner_radius_top_left = 6
|
||||
corner_radius_top_right = 6
|
||||
corner_radius_bottom_right = 6
|
||||
corner_radius_bottom_left = 6
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_ouso4"]
|
||||
content_margin_left = 6.0
|
||||
content_margin_top = 4.0
|
||||
content_margin_right = 6.0
|
||||
content_margin_bottom = 4.0
|
||||
bg_color = Color(0.04, 0.07, 0.09, 0.82)
|
||||
border_width_left = 2
|
||||
border_width_top = 2
|
||||
border_width_right = 2
|
||||
border_width_bottom = 2
|
||||
border_color = Color(0.43, 0.78, 0.88, 0.95)
|
||||
corner_radius_top_left = 6
|
||||
corner_radius_top_right = 6
|
||||
corner_radius_bottom_right = 6
|
||||
corner_radius_bottom_left = 6
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_blune"]
|
||||
content_margin_left = 6.0
|
||||
content_margin_top = 4.0
|
||||
content_margin_right = 6.0
|
||||
content_margin_bottom = 4.0
|
||||
bg_color = Color(0.04, 0.07, 0.09, 0.82)
|
||||
border_width_left = 2
|
||||
border_width_top = 2
|
||||
border_width_right = 2
|
||||
border_width_bottom = 2
|
||||
border_color = Color(0.43, 0.78, 0.88, 0.95)
|
||||
corner_radius_top_left = 6
|
||||
corner_radius_top_right = 6
|
||||
corner_radius_bottom_right = 6
|
||||
corner_radius_bottom_left = 6
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_th5th"]
|
||||
content_margin_left = 6.0
|
||||
content_margin_top = 4.0
|
||||
content_margin_right = 6.0
|
||||
content_margin_bottom = 4.0
|
||||
bg_color = Color(0.04, 0.07, 0.09, 0.82)
|
||||
border_width_left = 2
|
||||
border_width_top = 2
|
||||
border_width_right = 2
|
||||
border_width_bottom = 2
|
||||
border_color = Color(0.43, 0.78, 0.88, 0.95)
|
||||
corner_radius_top_left = 6
|
||||
corner_radius_top_right = 6
|
||||
corner_radius_bottom_right = 6
|
||||
corner_radius_bottom_left = 6
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_7smn1"]
|
||||
bg_color = Color(0.12, 0.08, 0.08, 0.86)
|
||||
border_width_left = 1
|
||||
border_width_top = 1
|
||||
border_width_right = 1
|
||||
border_width_bottom = 1
|
||||
border_color = Color(0.6, 0.12, 0.16, 0.95)
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_raeie"]
|
||||
bg_color = Color(0.86, 0.11, 0.18, 1)
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_hxu8e"]
|
||||
bg_color = Color(0.18, 0.66, 0.95, 1)
|
||||
border_width_left = 1
|
||||
border_width_top = 1
|
||||
border_width_right = 1
|
||||
border_width_bottom = 1
|
||||
border_color = Color(0.66, 0.92, 1, 0.9)
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_nvumn"]
|
||||
bg_color = Color(0.18, 0.66, 0.95, 1)
|
||||
border_width_left = 1
|
||||
border_width_top = 1
|
||||
border_width_right = 1
|
||||
border_width_bottom = 1
|
||||
border_color = Color(0.66, 0.92, 1, 0.9)
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_ou6is"]
|
||||
bg_color = Color(0.18, 0.66, 0.95, 1)
|
||||
border_width_left = 1
|
||||
border_width_top = 1
|
||||
border_width_right = 1
|
||||
border_width_bottom = 1
|
||||
border_color = Color(0.66, 0.92, 1, 0.9)
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_necax"]
|
||||
bg_color = Color(0.18, 0.66, 0.95, 1)
|
||||
border_width_left = 1
|
||||
border_width_top = 1
|
||||
border_width_right = 1
|
||||
border_width_bottom = 1
|
||||
border_color = Color(0.66, 0.92, 1, 0.9)
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_r4lks"]
|
||||
bg_color = Color(0.18, 0.66, 0.95, 1)
|
||||
border_width_left = 1
|
||||
border_width_top = 1
|
||||
border_width_right = 1
|
||||
border_width_bottom = 1
|
||||
border_color = Color(0.66, 0.92, 1, 0.9)
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_pg34l"]
|
||||
bg_color = Color(0.18, 0.66, 0.95, 1)
|
||||
border_width_left = 1
|
||||
border_width_top = 1
|
||||
border_width_right = 1
|
||||
border_width_bottom = 1
|
||||
border_color = Color(0.66, 0.92, 1, 0.9)
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_m4h2d"]
|
||||
bg_color = Color(0.18, 0.66, 0.95, 1)
|
||||
border_width_left = 1
|
||||
border_width_top = 1
|
||||
border_width_right = 1
|
||||
border_width_bottom = 1
|
||||
border_color = Color(0.66, 0.92, 1, 0.9)
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_p8abn"]
|
||||
bg_color = Color(0.18, 0.66, 0.95, 1)
|
||||
border_width_left = 1
|
||||
border_width_top = 1
|
||||
border_width_right = 1
|
||||
border_width_bottom = 1
|
||||
border_color = Color(0.66, 0.92, 1, 0.9)
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_s17dp"]
|
||||
bg_color = Color(0.18, 0.66, 0.95, 1)
|
||||
border_width_left = 1
|
||||
border_width_top = 1
|
||||
border_width_right = 1
|
||||
border_width_bottom = 1
|
||||
border_color = Color(0.66, 0.92, 1, 0.9)
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_37hlw"]
|
||||
bg_color = Color(0.18, 0.66, 0.95, 1)
|
||||
border_width_left = 1
|
||||
border_width_top = 1
|
||||
border_width_right = 1
|
||||
border_width_bottom = 1
|
||||
border_color = Color(0.66, 0.92, 1, 0.9)
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_charge_bg"]
|
||||
bg_color = Color(0.08, 0.07, 0.12, 0.86)
|
||||
border_width_left = 1
|
||||
border_width_top = 1
|
||||
border_width_right = 1
|
||||
border_width_bottom = 1
|
||||
border_color = Color(0.42, 0.36, 0.75, 0.9)
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_charge_fill"]
|
||||
bg_color = Color(0.92, 0.72, 0.25, 1)
|
||||
[ext_resource type="Script" uid="uid://3n4nkejauoim" path="res://scenes/main/main.gd" id="1_main"]
|
||||
[ext_resource type="PackedScene" path="res://scenes/stage/stage.tscn" id="4_stage"]
|
||||
[ext_resource type="PackedScene" path="res://scenes/ui/main_ui.tscn" id="5_ui"]
|
||||
[ext_resource type="Script" path="res://scenes/chart/chart_runner.gd" id="6_chart_runner"]
|
||||
|
||||
[node name="Main" type="Node2D" unique_id=596674982]
|
||||
script = ExtResource("3_main_script")
|
||||
script = ExtResource("1_main")
|
||||
|
||||
[node name="RhythmConductor" type="AudioStreamPlayer" parent="." unique_id=147408036]
|
||||
stream = ExtResource("5_song")
|
||||
volume_db = -10.0
|
||||
script = ExtResource("4_rhythm_script")
|
||||
[node name="Stage" parent="." instance=ExtResource("4_stage")]
|
||||
|
||||
[node name="ground" parent="." unique_id=235100600 instance=ExtResource("1_ground")]
|
||||
[node name="ChartRunner" type="Node" parent="."]
|
||||
script = ExtResource("6_chart_runner")
|
||||
|
||||
[node name="Player" parent="." unique_id=1027194058 instance=ExtResource("2_player")]
|
||||
position = Vector2(2047, 370)
|
||||
|
||||
[node name="RhythmFeedback" type="CanvasLayer" parent="." unique_id=979375765]
|
||||
|
||||
[node name="RhythmTrack" type="Control" parent="RhythmFeedback" unique_id=529739298]
|
||||
layout_mode = 3
|
||||
anchors_preset = 5
|
||||
anchor_left = 0.5
|
||||
anchor_right = 0.5
|
||||
offset_left = -520.0
|
||||
offset_top = 28.0
|
||||
offset_right = 520.0
|
||||
offset_bottom = 172.0
|
||||
grow_horizontal = 2
|
||||
|
||||
[node name="LeftRod" type="TextureRect" parent="RhythmFeedback/RhythmTrack" unique_id=569576128]
|
||||
layout_mode = 0
|
||||
offset_left = 64.0
|
||||
offset_top = 60.0
|
||||
offset_right = 464.0
|
||||
offset_bottom = 84.0
|
||||
texture = ExtResource("8_rod")
|
||||
expand_mode = 1
|
||||
stretch_mode = 5
|
||||
|
||||
[node name="LeftRod" type="TextureRect" parent="RhythmFeedback/RhythmTrack/LeftRod" unique_id=1074213105]
|
||||
layout_mode = 0
|
||||
offset_left = 127.0
|
||||
offset_top = 1.0
|
||||
offset_right = 527.0
|
||||
offset_bottom = 25.0
|
||||
texture = ExtResource("8_rod")
|
||||
expand_mode = 1
|
||||
stretch_mode = 5
|
||||
|
||||
[node name="RightRod" type="TextureRect" parent="RhythmFeedback/RhythmTrack" unique_id=112177250]
|
||||
layout_mode = 0
|
||||
offset_left = 446.0
|
||||
offset_top = 62.0
|
||||
offset_right = 846.0
|
||||
offset_bottom = 86.0
|
||||
texture = ExtResource("8_rod")
|
||||
expand_mode = 1
|
||||
stretch_mode = 5
|
||||
|
||||
[node name="RightRod" type="TextureRect" parent="RhythmFeedback/RhythmTrack/RightRod" unique_id=1431511936]
|
||||
layout_mode = 0
|
||||
offset_left = 127.0
|
||||
offset_right = 527.0
|
||||
offset_bottom = 24.0
|
||||
texture = ExtResource("8_rod")
|
||||
expand_mode = 1
|
||||
stretch_mode = 5
|
||||
|
||||
[node name="BlueBallLeft1" type="TextureRect" parent="RhythmFeedback/RhythmTrack" unique_id=649449082]
|
||||
layout_mode = 0
|
||||
offset_left = 184.0
|
||||
offset_top = 49.0
|
||||
offset_right = 228.0
|
||||
offset_bottom = 93.0
|
||||
texture = ExtResource("9_blue_ball")
|
||||
expand_mode = 1
|
||||
stretch_mode = 5
|
||||
|
||||
[node name="BlueBallLeft2" type="TextureRect" parent="RhythmFeedback/RhythmTrack" unique_id=1327939368]
|
||||
layout_mode = 0
|
||||
offset_left = 309.0
|
||||
offset_top = 50.0
|
||||
offset_right = 353.0
|
||||
offset_bottom = 94.0
|
||||
texture = ExtResource("9_blue_ball")
|
||||
expand_mode = 1
|
||||
stretch_mode = 5
|
||||
|
||||
[node name="BlueBallLeft3" type="TextureRect" parent="RhythmFeedback/RhythmTrack" unique_id=1352623059]
|
||||
layout_mode = 0
|
||||
offset_left = 427.0
|
||||
offset_top = 51.0
|
||||
offset_right = 471.0
|
||||
offset_bottom = 95.0
|
||||
texture = ExtResource("9_blue_ball")
|
||||
expand_mode = 1
|
||||
stretch_mode = 5
|
||||
|
||||
[node name="BlueBallRight1" type="TextureRect" parent="RhythmFeedback/RhythmTrack" unique_id=75338529]
|
||||
layout_mode = 0
|
||||
offset_left = 567.0
|
||||
offset_top = 52.0
|
||||
offset_right = 611.0
|
||||
offset_bottom = 96.0
|
||||
texture = ExtResource("9_blue_ball")
|
||||
expand_mode = 1
|
||||
stretch_mode = 5
|
||||
|
||||
[node name="BlueBallRight2" type="TextureRect" parent="RhythmFeedback/RhythmTrack" unique_id=484948530]
|
||||
layout_mode = 0
|
||||
offset_left = 687.0
|
||||
offset_top = 52.0
|
||||
offset_right = 731.0
|
||||
offset_bottom = 96.0
|
||||
texture = ExtResource("9_blue_ball")
|
||||
expand_mode = 1
|
||||
stretch_mode = 5
|
||||
|
||||
[node name="BlueBallRight3" type="TextureRect" parent="RhythmFeedback/RhythmTrack" unique_id=587810490]
|
||||
layout_mode = 0
|
||||
offset_left = 813.0
|
||||
offset_top = 52.0
|
||||
offset_right = 857.0
|
||||
offset_bottom = 96.0
|
||||
texture = ExtResource("9_blue_ball")
|
||||
expand_mode = 1
|
||||
stretch_mode = 5
|
||||
|
||||
[node name="LeftMover" type="TextureRect" parent="RhythmFeedback/RhythmTrack" unique_id=2070100389]
|
||||
layout_mode = 0
|
||||
offset_left = 183.0
|
||||
offset_top = 47.0
|
||||
offset_right = 227.0
|
||||
offset_bottom = 91.0
|
||||
texture = ExtResource("10_yellow_ball")
|
||||
expand_mode = 1
|
||||
stretch_mode = 5
|
||||
|
||||
[node name="RightMover" type="TextureRect" parent="RhythmFeedback/RhythmTrack" unique_id=1028576547]
|
||||
layout_mode = 0
|
||||
offset_left = 815.0
|
||||
offset_top = 52.0
|
||||
offset_right = 859.0
|
||||
offset_bottom = 96.0
|
||||
texture = ExtResource("10_yellow_ball")
|
||||
expand_mode = 1
|
||||
stretch_mode = 5
|
||||
|
||||
[node name="CenterBase" type="TextureRect" parent="RhythmFeedback/RhythmTrack" unique_id=1816341281]
|
||||
layout_mode = 0
|
||||
offset_left = 464.0
|
||||
offset_top = 16.0
|
||||
offset_right = 576.0
|
||||
offset_bottom = 128.0
|
||||
texture = ExtResource("6_center")
|
||||
expand_mode = 1
|
||||
stretch_mode = 5
|
||||
|
||||
[node name="CenterFlash" type="TextureRect" parent="RhythmFeedback/RhythmTrack" unique_id=1764975684]
|
||||
modulate = Color(1, 1, 1, 0)
|
||||
layout_mode = 0
|
||||
offset_left = 440.0
|
||||
offset_top = -8.0
|
||||
offset_right = 600.0
|
||||
offset_bottom = 152.0
|
||||
texture = ExtResource("7_center_flash")
|
||||
expand_mode = 1
|
||||
stretch_mode = 5
|
||||
|
||||
[node name="JudgementLabel" type="Label" parent="RhythmFeedback" unique_id=776378947]
|
||||
anchors_preset = 5
|
||||
anchor_left = 0.5
|
||||
anchor_right = 0.5
|
||||
offset_left = -240.0
|
||||
offset_top = 174.0
|
||||
offset_right = 240.0
|
||||
offset_bottom = 222.0
|
||||
grow_horizontal = 2
|
||||
theme_override_font_sizes/font_size = 24
|
||||
text = "READY"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="ComboWindow" type="HBoxContainer" parent="RhythmFeedback" unique_id=1940360666]
|
||||
anchors_preset = 5
|
||||
anchor_left = 0.5
|
||||
anchor_right = 0.5
|
||||
offset_left = -148.0
|
||||
offset_top = 222.0
|
||||
offset_right = 148.0
|
||||
offset_bottom = 282.0
|
||||
pivot_offset = Vector2(148, 30)
|
||||
theme_override_constants/separation = 10
|
||||
|
||||
[node name="Slot0" type="PanelContainer" parent="RhythmFeedback/ComboWindow" unique_id=181099068]
|
||||
modulate = Color(1, 1, 1, 0.45)
|
||||
custom_minimum_size = Vector2(64, 56)
|
||||
layout_mode = 2
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_a8run")
|
||||
|
||||
[node name="Key" type="Label" parent="RhythmFeedback/ComboWindow/Slot0" unique_id=1605416584]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
theme_override_colors/font_color = Color(0.94, 0.98, 1, 1)
|
||||
theme_override_colors/font_shadow_color = Color(0, 0, 0, 0.9)
|
||||
theme_override_constants/shadow_offset_x = 2
|
||||
theme_override_constants/shadow_offset_y = 2
|
||||
theme_override_font_sizes/font_size = 26
|
||||
text = "·"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="Slot1" type="PanelContainer" parent="RhythmFeedback/ComboWindow" unique_id=1398681506]
|
||||
modulate = Color(1, 1, 1, 0.45)
|
||||
custom_minimum_size = Vector2(64, 56)
|
||||
layout_mode = 2
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_ouso4")
|
||||
|
||||
[node name="Key" type="Label" parent="RhythmFeedback/ComboWindow/Slot1" unique_id=1841250488]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
theme_override_colors/font_color = Color(0.94, 0.98, 1, 1)
|
||||
theme_override_colors/font_shadow_color = Color(0, 0, 0, 0.9)
|
||||
theme_override_constants/shadow_offset_x = 2
|
||||
theme_override_constants/shadow_offset_y = 2
|
||||
theme_override_font_sizes/font_size = 26
|
||||
text = "·"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="Slot2" type="PanelContainer" parent="RhythmFeedback/ComboWindow" unique_id=22762864]
|
||||
modulate = Color(1, 1, 1, 0.45)
|
||||
custom_minimum_size = Vector2(64, 56)
|
||||
layout_mode = 2
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_blune")
|
||||
|
||||
[node name="Key" type="Label" parent="RhythmFeedback/ComboWindow/Slot2" unique_id=470444619]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
theme_override_colors/font_color = Color(0.94, 0.98, 1, 1)
|
||||
theme_override_colors/font_shadow_color = Color(0, 0, 0, 0.9)
|
||||
theme_override_constants/shadow_offset_x = 2
|
||||
theme_override_constants/shadow_offset_y = 2
|
||||
theme_override_font_sizes/font_size = 26
|
||||
text = "·"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="Slot3" type="PanelContainer" parent="RhythmFeedback/ComboWindow" unique_id=669931458]
|
||||
modulate = Color(1, 1, 1, 0.45)
|
||||
custom_minimum_size = Vector2(64, 56)
|
||||
layout_mode = 2
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_th5th")
|
||||
|
||||
[node name="Key" type="Label" parent="RhythmFeedback/ComboWindow/Slot3" unique_id=1939775423]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
theme_override_colors/font_color = Color(0.94, 0.98, 1, 1)
|
||||
theme_override_colors/font_shadow_color = Color(0, 0, 0, 0.9)
|
||||
theme_override_constants/shadow_offset_x = 2
|
||||
theme_override_constants/shadow_offset_y = 2
|
||||
theme_override_font_sizes/font_size = 26
|
||||
text = "·"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="ComboSkillLabel" type="Label" parent="RhythmFeedback" unique_id=246366341]
|
||||
anchors_preset = 5
|
||||
anchor_left = 0.5
|
||||
anchor_right = 0.5
|
||||
offset_left = -240.0
|
||||
offset_top = 286.0
|
||||
offset_right = 240.0
|
||||
offset_bottom = 322.0
|
||||
theme_override_colors/font_color = Color(1, 0.84, 0.26, 1)
|
||||
theme_override_colors/font_shadow_color = Color(0, 0, 0, 0.85)
|
||||
theme_override_constants/shadow_offset_x = 2
|
||||
theme_override_constants/shadow_offset_y = 2
|
||||
theme_override_font_sizes/font_size = 18
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="StatusBars" type="VBoxContainer" parent="RhythmFeedback" unique_id=1850079775]
|
||||
offset_left = 24.0
|
||||
offset_top = 9.0
|
||||
offset_right = 294.0
|
||||
offset_bottom = 69.0
|
||||
theme_override_constants/separation = 8
|
||||
|
||||
[node name="HealthBar" type="ProgressBar" parent="RhythmFeedback/StatusBars" unique_id=562194184]
|
||||
custom_minimum_size = Vector2(270, 18)
|
||||
layout_mode = 2
|
||||
theme_override_styles/background = SubResource("StyleBoxFlat_7smn1")
|
||||
theme_override_styles/fill = SubResource("StyleBoxFlat_raeie")
|
||||
value = 100.0
|
||||
show_percentage = false
|
||||
|
||||
[node name="EnergyBar" type="HBoxContainer" parent="RhythmFeedback/StatusBars" unique_id=353280285]
|
||||
custom_minimum_size = Vector2(270, 16)
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 4
|
||||
|
||||
[node name="Segment0" type="Panel" parent="RhythmFeedback/StatusBars/EnergyBar" unique_id=1721101704]
|
||||
modulate = Color(1, 1, 1, 0.38)
|
||||
custom_minimum_size = Vector2(23, 16)
|
||||
layout_mode = 2
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_hxu8e")
|
||||
|
||||
[node name="Segment1" type="Panel" parent="RhythmFeedback/StatusBars/EnergyBar" unique_id=2071238510]
|
||||
modulate = Color(1, 1, 1, 0.38)
|
||||
custom_minimum_size = Vector2(23, 16)
|
||||
layout_mode = 2
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_nvumn")
|
||||
|
||||
[node name="Segment2" type="Panel" parent="RhythmFeedback/StatusBars/EnergyBar" unique_id=820288176]
|
||||
modulate = Color(1, 1, 1, 0.38)
|
||||
custom_minimum_size = Vector2(23, 16)
|
||||
layout_mode = 2
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_ou6is")
|
||||
|
||||
[node name="Segment3" type="Panel" parent="RhythmFeedback/StatusBars/EnergyBar" unique_id=1809879636]
|
||||
modulate = Color(1, 1, 1, 0.38)
|
||||
custom_minimum_size = Vector2(23, 16)
|
||||
layout_mode = 2
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_necax")
|
||||
|
||||
[node name="Segment4" type="Panel" parent="RhythmFeedback/StatusBars/EnergyBar" unique_id=205364545]
|
||||
modulate = Color(1, 1, 1, 0.38)
|
||||
custom_minimum_size = Vector2(23, 16)
|
||||
layout_mode = 2
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_r4lks")
|
||||
|
||||
[node name="Segment5" type="Panel" parent="RhythmFeedback/StatusBars/EnergyBar" unique_id=1414251865]
|
||||
modulate = Color(1, 1, 1, 0.38)
|
||||
custom_minimum_size = Vector2(23, 16)
|
||||
layout_mode = 2
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_pg34l")
|
||||
|
||||
[node name="Segment6" type="Panel" parent="RhythmFeedback/StatusBars/EnergyBar" unique_id=1626363537]
|
||||
modulate = Color(1, 1, 1, 0.38)
|
||||
custom_minimum_size = Vector2(23, 16)
|
||||
layout_mode = 2
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_m4h2d")
|
||||
|
||||
[node name="Segment7" type="Panel" parent="RhythmFeedback/StatusBars/EnergyBar" unique_id=1577127808]
|
||||
modulate = Color(1, 1, 1, 0.38)
|
||||
custom_minimum_size = Vector2(23, 16)
|
||||
layout_mode = 2
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_p8abn")
|
||||
|
||||
[node name="Segment8" type="Panel" parent="RhythmFeedback/StatusBars/EnergyBar" unique_id=1597873707]
|
||||
modulate = Color(1, 1, 1, 0.38)
|
||||
custom_minimum_size = Vector2(23, 16)
|
||||
layout_mode = 2
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_s17dp")
|
||||
|
||||
[node name="Segment9" type="Panel" parent="RhythmFeedback/StatusBars/EnergyBar" unique_id=1260417702]
|
||||
modulate = Color(1, 1, 1, 0.38)
|
||||
custom_minimum_size = Vector2(23, 16)
|
||||
layout_mode = 2
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_37hlw")
|
||||
|
||||
[node name="ChargeBar" type="ProgressBar" parent="RhythmFeedback/StatusBars" unique_id=674131167]
|
||||
modulate = Color(1, 1, 1, 0.45)
|
||||
custom_minimum_size = Vector2(270, 10)
|
||||
layout_mode = 2
|
||||
theme_override_styles/background = SubResource("StyleBoxFlat_charge_bg")
|
||||
theme_override_styles/fill = SubResource("StyleBoxFlat_charge_fill")
|
||||
max_value = 1.1
|
||||
show_percentage = false
|
||||
[node name="UI" parent="." instance=ExtResource("5_ui")]
|
||||
|
||||
Reference in New Issue
Block a user