/**
 * 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 { ACubismMotion } from './acubismmotion' ; import { CubismMotionQueueEntryHandle } from './cubismmotionqueuemanager' ; /**
 * CubismMotionQueueManagerで再生している各モーションの管理クラス。
 */ export class CubismMotionQueueEntry { /**
     * コンストラクタ
     */ public constructor ( ) { this . _autoDelete = false ; this . _motion = null ; this . _available = true ; this . _finished = false ; this . _started = false ; this . _startTimeSeconds = - 1.0 ; this . _fadeInStartTimeSeconds = 0.0 ; this . _endTimeSeconds = - 1.0 ; this . _stateTimeSeconds = 0.0 ; this . _stateWeight = 0.0 ; this . _lastEventCheckSeconds = 0.0 ; this . _motionQueueEntryHandle = this ; this . _fadeOutSeconds = 0.0 ; this . _isTriggeredFadeOut = false ; } /**
     * デストラクタ相当の処理
     */ public release ( ) { if ( this . _autoDelete && this . _motion ) { ACubismMotion . delete ( this . _motion ) ; } } param fadeOutSeconds public setFadeOut ( fadeOutSeconds ) { this . _fadeOutSeconds = fadeOutSeconds ; this . _isTriggeredFadeOut = true ; } param fadeOutSeconds param userTimeSeconds public startFadeOut ( fadeOutSeconds , userTimeSeconds ) { const newEndTimeSeconds = userTimeSeconds + fadeOutSeconds ; this . _isTriggeredFadeOut = true ; if ( this . _endTimeSeconds < 0.0 || newEndTimeSeconds < this . _endTimeSeconds ) { this . _endTimeSeconds = newEndTimeSeconds ; } } return return public isFinished ( ) { return this . _finished ; } return return public isStarted ( ) { return this . _started ; } return public getStartTime ( ) { return this . _startTimeSeconds ; } return public getFadeInStartTime ( ) { return this . _fadeInStartTimeSeconds ; } return public getEndTime ( ) { return this . _endTimeSeconds ; } param startTime public setStartTime ( startTime ) { this . _startTimeSeconds = startTime ; } param startTime public setFadeInStartTime ( startTime ) { this . _fadeInStartTimeSeconds = startTime ; } param endTime public setEndTime ( endTime ) { this . _endTimeSeconds = endTime ; } param f public setIsFinished ( f ) { this . _finished = f ; } param f public setIsStarted ( f ) { this . _started = f ; } return return public isAvailable ( ) { return this . _available ; } param v public setIsAvailable ( v ) { this . _available = v ; } param timeSeconds param weight public setState ( timeSeconds , weight ) { this . _stateTimeSeconds = timeSeconds ; this . _stateWeight = weight ; } return public getStateTime ( ) { return this . _stateTimeSeconds ; } return public getStateWeight ( ) { return this . _stateWeight ; } return public getLastCheckEventSeconds ( ) { return this . _lastEventCheckSeconds ; } param checkSeconds public setLastCheckEventSeconds ( checkSeconds ) { this . _lastEventCheckSeconds = checkSeconds ; } return public isTriggeredFadeOut ( ) { return this . _isTriggeredFadeOut ; } return public getFadeOutSeconds ( ) { return this . _fadeOutSeconds ; } _autoDelete : boolean ; _motion : ACubismMotion ; _available : boolean ; _finished : boolean ; _started : boolean ; _startTimeSeconds : number ; _fadeInStartTimeSeconds : number ; _endTimeSeconds : number ; _stateTimeSeconds : number ; _stateWeight : number ; _lastEventCheckSeconds : number ; private _fadeOutSeconds : number ; private _isTriggeredFadeOut : boolean ; _motionQueueEntryHandle : CubismMotionQueueEntryHandle ; } import * as $ from './cubismmotionqueueentry' ; export namespace Live2DCubismFramework { export const CubismMotionQueueEntry = $ . CubismMotionQueueEntry ; export type CubismMotionQueueEntry = $ . CubismMotionQueueEntry ; }