import { Animator } from "./Animator" ; import { Queue } from "./Queue" ; param onComplete export type OnIntroduction = ( onComplete : ( ) => void ) => void ; /**
 * Animator for teams introducing themselves.
 */ export class Introductions extends Animator { param onComplete public run ( onComplete ) { const queue = new Queue ( ) ; queue . add ( ( next ) : void => { this . animations . opponent . introduction ( next ) ; } ) ; queue . add ( ( next ) : void => { this . animations . player . introduction ( next ) ; } ) ; queue . add ( ( next ) : void => { this . animations . opponent . switching . enter ( next ) ; } ) ; queue . add ( ( next ) : void => { this . animations . player . switching . enter ( next ) ; } ) ; queue . run ( onComplete ) ; } }