class WorkspotFunctionalTestsDebugListener { private var m_entityId : EntityID; private var m_instancesCreated : Int32; default m_instancesCreated = 0; private var m_instancesRemoved : Int32; default m_instancesRemoved = 0; private var m_workspotsSetup : Int32; default m_workspotsSetup = 0; private var m_workspotsStarted : Int32; default m_workspotsStarted = 0; private var m_workspotsFinished : Int32; default m_workspotsFinished = 0; private var m_animationsStack : array< String >; private var m_animationsSkippedStack : array< String >; private var m_animationsMissingStack : array< String >; private var m_skipOverflows : Int32; default m_skipOverflows = 0; private var m_teleportRequests : Int32; default m_teleportRequests = 0; private var m_movementRequests : Int32; default m_movementRequests = 0; public function GetEntityID() : EntityID { return m_entityId; } public function SetEntityID( entID : EntityID ) { m_entityId = entID; } public function GetInstancesCreatedCount() : Int32 { return m_instancesCreated; } public function GetInstancesRemovedCount() : Int32 { return m_instancesRemoved; } public function GetWorkspotsSetupCount() : Int32 { return m_workspotsSetup; } public function GetWorkspotsStartedCount() : Int32 { if( ( m_workspotsStarted == 0 ) && GameInstance.GetWorkspotSystem( GetGameInstance() ).IsActorInWorkspot( ( ( GameObject )( GameInstance.FindEntityByID( GetGameInstance(), m_entityId ) ) ) ) ) { m_workspotsStarted += 1; } return m_workspotsStarted; } public function GetWorkspotsFinishedCount() : Int32 { return m_workspotsFinished; } public function GetAnimationStack() : array< String > { return m_animationsStack; } public function GetLastPlayedAnimation() : String { return m_animationsStack.Last(); } public function GetAnimationPlayCount( const animationName : ref< String > ) : Int32 { var i : Int32; var count : Int32; count = 0; for( i = 0; i < m_animationsStack.Size(); i += 1 ) { if( m_animationsStack[ i ] == animationName ) { count += 1; } } return count; } public function GetSkippedAnimationStack() : array< String > { return m_animationsSkippedStack; } public function GetLastSkippedAnimation() : String { return m_animationsSkippedStack.Last(); } public function GetMissingAnimationStack() : array< String > { return m_animationsMissingStack; } public function GetLastMissingAnimation() : String { return m_animationsMissingStack.Last(); } public function GetSkipOverflowsCount() : Int32 { return m_skipOverflows; } public function GetTeleportRequestsCount() : Int32 { return m_teleportRequests; } public function GetMovementRequestsCount() : Int32 { return m_movementRequests; } protected event OnInstanceCreated() { FTLog( "[WorkspotFunctionalTestsDebugListener:OnInstanceCreated] EntityID: " + EntityID.ToDebugString( m_entityId ) ); m_instancesCreated += 1; } protected event OnInstanceRemoved() { FTLog( "[WorkspotFunctionalTestsDebugListener:OnInstanceRemoved] EntityID: " + EntityID.ToDebugString( m_entityId ) ); m_instancesRemoved += 1; } protected event OnWorkspotSetup( path : String ) { FTLog( ( ( "[WorkspotFunctionalTestsDebugListener:OnWorkspotSetup] EntityID: " + EntityID.ToDebugString( m_entityId ) ) + " path: " ) + path ); m_workspotsSetup += 1; } protected event OnWorkspotStarted() { FTLog( "[WorkspotFunctionalTestsDebugListener:OnWorkspotStarted] EntityID: " + EntityID.ToDebugString( m_entityId ) ); m_workspotsStarted += 1; } protected event OnWorkspotFinished() { FTLog( "[WorkspotFunctionalTestsDebugListener:OnWorkspotFinished] EntityID: " + EntityID.ToDebugString( m_entityId ) ); m_workspotsFinished += 1; } protected event OnAnimationChanged( animName : CName, workEntryID : WorkEntryId ) { FTLog( ( ( "[WorkspotFunctionalTestsDebugListener:OnAnimationChanged] EntityID: " + EntityID.ToDebugString( m_entityId ) ) + " animName: " ) + NameToString( animName ) ); m_animationsStack.PushBack( NameToString( animName ) ); } protected event OnAnimationSkipped( animName : CName, workEntryID : WorkEntryId ) { FTLog( ( ( "[WorkspotFunctionalTestsDebugListener:OnAnimationSkipped] EntityID: " + EntityID.ToDebugString( m_entityId ) ) + " animName: " ) + NameToString( animName ) ); m_animationsSkippedStack.PushBack( NameToString( animName ) ); } protected event OnAnimationMissing( animName : CName, workEntryID : WorkEntryId ) { FTLog( ( ( "[WorkspotFunctionalTestsDebugListener:OnAnimationMissing] EntityID: " + EntityID.ToDebugString( m_entityId ) ) + " animName: " ) + NameToString( animName ) ); m_animationsMissingStack.PushBack( NameToString( animName ) ); } protected event OnSkipOverflow() { FTLog( "[WorkspotFunctionalTestsDebugListener:OnSkipOverflow] EntityID: " + EntityID.ToDebugString( m_entityId ) ); m_skipOverflows += 1; } protected event OnTeleportRequest() { FTLog( "[WorkspotFunctionalTestsDebugListener:OnTeleportRequest] EntityID: " + EntityID.ToDebugString( m_entityId ) ); m_teleportRequests += 1; } protected event OnMovementRequest() { FTLog( "[WorkspotFunctionalTestsDebugListener:OnMovementRequest] EntityID: " + EntityID.ToDebugString( m_entityId ) ); m_movementRequests += 1; } }