/**
 * Copyright(c) Live2D Inc. All rights reserved.
 *
 * Use of this source code is governed by the Live2D Open Software license
 * that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
 */ import { CubismModel } from '../model/cubismmodel' ; import { ACubismMotion } from './acubismmotion' ; import { CubismMotionQueueEntryHandle , CubismMotionQueueManager } from './cubismmotionqueuemanager' ; /**
 * モーションの管理
 *
 * モーションの管理を行うクラス
 */ export class CubismMotionManager extends CubismMotionQueueManager { /**
     * コンストラクタ
     */ public constructor ( ) { super ( ) ; this . _currentPriority = 0 ; this . _reservePriority = 0 ; } return public getCurrentPriority ( ) { return this . _currentPriority ; } return public getReservePriority ( ) { return this . _reservePriority ; } param val public setReservePriority ( val ) { this . _reservePriority = val ; } param motion param autoDelete param priority return public startMotionPriority ( motion , autoDelete , priority ) { if ( priority == this . _reservePriority ) { this . _reservePriority = 0 ; } this . _currentPriority = priority ; return super . startMotion ( motion , autoDelete , this . _userTimeSeconds ) ; } param model param deltaTimeSeconds return return public updateMotion ( model , deltaTimeSeconds ) { this . _userTimeSeconds += deltaTimeSeconds ; const updated = super . doUpdateMotion ( model , this . _userTimeSeconds ) ; if ( this . isFinished ( ) ) { this . _currentPriority = 0 ; } return updated ; } param priority return return public reserveMotion ( priority ) { if ( priority <= this . _reservePriority || priority <= this . _currentPriority ) { return false ; } this . _reservePriority = priority ; return true ; } _currentPriority : number ; _reservePriority : number ; } import * as $ from './cubismmotionmanager' ; export namespace Live2DCubismFramework { export const CubismMotionManager = $ . CubismMotionManager ; export type CubismMotionManager = $ . CubismMotionManager ; }