Binding of Isaac - Afterbirth+ Lua Reference/Guide
Sprite Class Reference

Public Member Functions

 Sprite (void)
 
boolean IsFinished (string AnimationName)
 
 Play (string AnimationName, boolean Force)
 
 SetFrame (string AnimationName, integer FrameNum)
 
 Reset ()
 
 Update ()
 
 Render (Vector Pos, Vector TopLeftClamp, Vector BottomRightClamp)
 
 RenderLayer (integer LayerId, Vector Pos)
 
 Load (string Filename, boolean LoadGraphics)
 
 Reload ()
 
 ReplaceSpritesheet (integer LayerId, string PngFilename)
 
 LoadGraphics ()
 
boolean IsLoaded ()
 
string GetFilename ()
 
 PlayRandom (integer Seed)
 
 Stop ()
 
boolean SetAnimation (string AnimationName)
 
integer GetFrame ()
 
 SetLastFrame ()
 
boolean IsPlaying (string AnimationName)
 
 SetLayerFrame (integer LayerId, integer FrameNum)
 
 PlayOverlay (string AnimationName, boolean Force)
 
boolean SetOverlayAnimation (string AnimationName)
 
 SetOverlayRenderPriority (boolean RenderFirst)
 
 SetOverlayFrame (string AnimationName, integer FrameNum)
 
integer GetOverlayFrame ()
 
 RemoveOverlay ()
 
boolean IsOverlayPlaying (string AnimationName)
 
boolean IsOverlayFinished (string AnimationName)
 
boolean IsEventTriggered (string EventName)
 
boolean WasEventTriggered (string EventName)
 
integer GetLayerCount ()
 
const string & GetDefaultAnimationName ()
 
Color GetTexel (Vector SamplePos, Vector RenderPos, float AlphaThreshold)
 
const string & GetDefaultAnimation ()
 

Public Attributes

const VectorOffset
 
const VectorScale
 
float Rotation
 
const ColorColor
 
boolean FlipX
 
boolean FlipY
 
float PlaybackSpeed
 

Constructor & Destructor Documentation

◆ Sprite()

Sprite::Sprite ( void  )

Member Function Documentation

◆ GetDefaultAnimation()

const string& Sprite::GetDefaultAnimation ( )

◆ GetDefaultAnimationName()

const string& Sprite::GetDefaultAnimationName ( )

◆ GetFilename()

string Sprite::GetFilename ( )

◆ GetFrame()

integer Sprite::GetFrame ( )

◆ GetLayerCount()

integer Sprite::GetLayerCount ( )

◆ GetOverlayFrame()

integer Sprite::GetOverlayFrame ( )

◆ GetTexel()

Color Sprite::GetTexel ( Vector  SamplePos,
Vector  RenderPos,
float  AlphaThreshold 
)

◆ IsEventTriggered()

boolean Sprite::IsEventTriggered ( string  EventName)

◆ IsFinished()

boolean Sprite::IsFinished ( string  AnimationName)

◆ IsLoaded()

boolean Sprite::IsLoaded ( )

◆ IsOverlayFinished()

boolean Sprite::IsOverlayFinished ( string  AnimationName)

◆ IsOverlayPlaying()

boolean Sprite::IsOverlayPlaying ( string  AnimationName)

◆ IsPlaying()

boolean Sprite::IsPlaying ( string  AnimationName)

◆ Load()

Sprite::Load ( string  Filename,
boolean  LoadGraphics 
)

◆ LoadGraphics()

Sprite::LoadGraphics ( )

◆ Play()

Sprite::Play ( string  AnimationName,
boolean  Force 
)

◆ PlayOverlay()

Sprite::PlayOverlay ( string  AnimationName,
boolean  Force 
)

◆ PlayRandom()

Sprite::PlayRandom ( integer  Seed)

◆ Reload()

Sprite::Reload ( )

◆ RemoveOverlay()

Sprite::RemoveOverlay ( )

◆ Render()

Sprite::Render ( Vector  Pos,
Vector  TopLeftClamp,
Vector  BottomRightClamp 
)

◆ RenderLayer()

Sprite::RenderLayer ( integer  LayerId,
Vector  Pos 
)

◆ ReplaceSpritesheet()

Sprite::ReplaceSpritesheet ( integer  LayerId,
string  PngFilename 
)

◆ Reset()

Sprite::Reset ( )

◆ SetAnimation()

boolean Sprite::SetAnimation ( string  AnimationName)

◆ SetFrame()

Sprite::SetFrame ( string  AnimationName,
integer  FrameNum 
)

◆ SetLastFrame()

Sprite::SetLastFrame ( )

◆ SetLayerFrame()

Sprite::SetLayerFrame ( integer  LayerId,
integer  FrameNum 
)

◆ SetOverlayAnimation()

boolean Sprite::SetOverlayAnimation ( string  AnimationName)

◆ SetOverlayFrame()

Sprite::SetOverlayFrame ( string  AnimationName,
integer  FrameNum 
)

◆ SetOverlayRenderPriority()

Sprite::SetOverlayRenderPriority ( boolean  RenderFirst)

◆ Stop()

Sprite::Stop ( )

◆ Update()

Sprite::Update ( )

◆ WasEventTriggered()

boolean Sprite::WasEventTriggered ( string  EventName)

Member Data Documentation

◆ FlipX

boolean Sprite::FlipX

◆ FlipY

boolean Sprite::FlipY

◆ Color

const Color& Sprite::Color

◆ Offset

const Vector& Sprite::Offset

◆ PlaybackSpeed

float Sprite::PlaybackSpeed

◆ Rotation

float Sprite::Rotation

◆ Scale

const Vector& Sprite::Scale