Turok
 
Loading...
Searching...
No Matches
kAnimState Class Reference

Public Member Functions

void Blend (const int animID, float speed, float blend, int flags)
 EnumAnimStateFlags.
 
void Set (const int animID, float speed, int flags)
 EnumAnimStateFlags.
 
const int CurrentFrame ()
 current frame playing for the current animation. Must have an animation action keyframe for this to work, otherwise use TrackFrame() instead. This should be named more like last frame an action was checked to execute.
 
const int NumFrames ()
 number of frames in this animation
 
const float PlayTime ()
 increases by GAME_DELTA_TIME if not stopped or paused.
 
const float TrackTime ()
 time from 0(on first frame) to 1(on last frame).
 
bool IsPlaying (const int animID)
 Returns true if current animations ID is animID and the animation is not stopped.
 
bool CheckAnimID (const int animID)
 checks if animID exists
 
const int PlayingID () const
 the current animations ID
 
void Stop ()
 flags |= ANF_STOPPED; flags &= ~ANF_LOOP;
 
void Pause ()
 flags |= ANF_PAUSED;
 
void Resume ()
 flags &= ~ANF_PAUSED;
 
const bool Stopped () const
 (flags & ANF_STOPPED) != 0
 
const bool Blending () const
 (flags & ANF_BLEND) != 0
 
const bool Looping () const
 (flags & ANF_LOOP) != 0
 
const bool CycleCompleted () const
 (flags & ANF_CYCLECOMPLETED) != 0
 
void ChangeSpeed (const float speed)
 Scales speed of the current animation where 1.0 = 15fps and 4.0 = 60fps.
 
void SetLastFrame (const bool execActions=false)
 if execActions is true, runs all key frame actions in the animation except Footstep(55) and PlaySound(248). applies the stop flag (flags |= ANF_STOPPED).
 
void SetPlayTime (const float time)
 The total time in seconds this animation has been playing.
 
void SetTrackTime (const float time)
 0.0(first frame) to 1.0(last frame)
 
const int TrackFrame (void) const
 
const int TrackNextFrame (void) const
 

Public Attributes

int flags
 EnumAnimStateFlags.
 

Detailed Description

Definition at line 997 of file t1_scriptAPI.cpp.

Member Function Documentation

◆ Blend()

void kAnimState::Blend ( const int animID,
float speed,
float blend,
int flags )

◆ Blending()

const bool kAnimState::Blending ( ) const

(flags & ANF_BLEND) != 0

◆ ChangeSpeed()

void kAnimState::ChangeSpeed ( const float speed)

Scales speed of the current animation where 1.0 = 15fps and 4.0 = 60fps.

◆ CheckAnimID()

bool kAnimState::CheckAnimID ( const int animID)

checks if animID exists

◆ CurrentFrame()

const int kAnimState::CurrentFrame ( )

current frame playing for the current animation. Must have an animation action keyframe for this to work, otherwise use TrackFrame() instead. This should be named more like last frame an action was checked to execute.

◆ CycleCompleted()

const bool kAnimState::CycleCompleted ( ) const

(flags & ANF_CYCLECOMPLETED) != 0

◆ IsPlaying()

bool kAnimState::IsPlaying ( const int animID)

Returns true if current animations ID is animID and the animation is not stopped.

◆ Looping()

const bool kAnimState::Looping ( ) const

(flags & ANF_LOOP) != 0

◆ NumFrames()

const int kAnimState::NumFrames ( )

number of frames in this animation

◆ Pause()

void kAnimState::Pause ( )

flags |= ANF_PAUSED;

◆ PlayingID()

const int kAnimState::PlayingID ( ) const

the current animations ID

◆ PlayTime()

const float kAnimState::PlayTime ( )

increases by GAME_DELTA_TIME if not stopped or paused.

◆ Resume()

void kAnimState::Resume ( )

flags &= ~ANF_PAUSED;

◆ Set()

void kAnimState::Set ( const int animID,
float speed,
int flags )

◆ SetLastFrame()

void kAnimState::SetLastFrame ( const bool execActions = false)

if execActions is true, runs all key frame actions in the animation except Footstep(55) and PlaySound(248). applies the stop flag (flags |= ANF_STOPPED).

◆ SetPlayTime()

void kAnimState::SetPlayTime ( const float time)

The total time in seconds this animation has been playing.

◆ SetTrackTime()

void kAnimState::SetTrackTime ( const float time)

0.0(first frame) to 1.0(last frame)

◆ Stop()

void kAnimState::Stop ( )

flags |= ANF_STOPPED; flags &= ~ANF_LOOP;

◆ Stopped()

const bool kAnimState::Stopped ( ) const

(flags & ANF_STOPPED) != 0

◆ TrackFrame()

const int kAnimState::TrackFrame ( void ) const

◆ TrackNextFrame()

const int kAnimState::TrackNextFrame ( void ) const

◆ TrackTime()

const float kAnimState::TrackTime ( )

time from 0(on first frame) to 1(on last frame).

Member Data Documentation

◆ flags

int kAnimState::flags

EnumAnimStateFlags.

Definition at line 1022 of file t1_scriptAPI.cpp.