Files
Papay-Shooter/characters/dance_routines.gd
T
2026-08-02 02:20:02 -04:00

68 lines
1.4 KiB
GDScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
extends Object
class_name DanceRoutines
## Five authored emotes available through the radial wheel.
##
## Every entry names an imported motion-capture clip. The previous version
## synthesized five routines by oscillating individual bones over one dance
## clip; that produced the programmer-animation quality this project is moving
## away from. Network IDs stay stable so existing peers and saved selections
## remain compatible.
const ROUTINES := [
{
"id": "two_step",
"name": "Dance",
"icon": "♪",
"clip": "Dance",
},
{
"id": "body_wave",
"name": "Chest Stretch",
"icon": "◆",
"clip": "EmoteStretch",
},
{
"id": "robot",
"name": "Call Out",
"icon": "!",
"clip": "EmoteCall",
},
{
"id": "bounce",
"name": "Yes!",
"icon": "✓",
"clip": "EmoteYes",
},
{
"id": "spin",
"name": "No",
"icon": "×",
"clip": "EmoteNo",
},
]
static func count() -> int:
return ROUTINES.size()
static func get_routine(index: int) -> Dictionary:
if ROUTINES.is_empty():
return {}
return ROUTINES[posmod(index, ROUTINES.size())]
static func clip_of(index: int) -> String:
return String(get_routine(index).get("clip", "Dance"))
static func name_of(index: int) -> String:
return String(get_routine(index).get("name", ""))
static func index_of(id: String) -> int:
for i in ROUTINES.size():
if ROUTINES[i]["id"] == id:
return i
return 0