Binding of Isaac - Afterbirth+ Lua Reference/Guide

Public Member Functions | Public Attributes | List of all members
Entity Class Reference
Inheritance diagram for Entity:

## Public Member Functions
table | GetData ()
| Update ()
| Render (Vector Offset)
boolean | RenderShadowLayer (Vector Offset)
| PostRender ()
boolean | TakeDamage (float Damage, integer Flags, EntityRef Source, integer DamageCountdown)
boolean | HasMortalDamage ()
| Kill ()
| Kills the entity and makes a blood splat or gibs. More...
| Die ()
| Remove ()
| BloodExplode ()
| Explodes with gibs and blood. More...
| AddVelocity (Vector Velocity)
| MultiplyFriction (float Value)
| SetColor (KColor KColor, integer Duration, integer Priority, boolean Fadeout, boolean Share)
const KColor & | GetColor ()
| SetSpriteFrame (string AnimationName, integer FrameNum)
| SetSpriteOverlayFrame (string AnimationName, integer FrameNum)
| SetSize (float Size, Vector SizeMulti, integer NumGridCollisionPoints)
boolean | CollidesWithGrid ()
boolean | IsEnemy ()
| return true for NPCs that are not controlled by the player More...
boolean | IsActiveEnemy (boolean includeDead)
| return true for non background NPCs (ex: every enemy except fire and shopkeepers) More...
boolean | IsVulnerableEnemy ()
| return true for enemies that can be damaged More...
boolean | IsFlying ()
| AddEntityFlags (integer Flags)
| ClearEntityFlags (integer Flags)
integer | GetEntityFlags ()
boolean | HasEntityFlags (integer Flags)
boolean | HasFullHealth ()
| AddHealth (float HitPoints)
| AddPoison (EntityRef Source, integer Duration, float Damage)
| AddFreeze (EntityRef Source, integer Duration)
| AddSlowing (EntityRef Source, integer Duration, float SlowValue, KColor SlowColor)
| Makes the friction higher. More...
| AddCharmed (integer Duration)
| AddConfusion (EntityRef Source, integer Duration, boolean IgnoreBosses)
| AddMidasFreeze (EntityRef Source, integer Duration)
| AddFear (EntityRef Source, integer Duration)
| AddBurn (EntityRef Source, integer Duration, float Damage)
| AddShrink (EntityRef Source, integer Duration)
| RemoveStatusEffects ()
boolean | Exists ()
boolean | IsDead ()
boolean | IsVisible ()
boolean | IsInvincible ()
boolean | CanShutDoors ()
| enemies keep the doors shut More...
boolean | IsBoss ()
| bosses display health bar More...
BossId | GetBossID ()
Entity & | GetLastParent ()
Entity & | GetLastChild ()
boolean | HasCommonParentWithEntity (Entity Other)
boolean | IsFrame (integer Frame, integer Offset)
| true every X frames More...
RNG & | GetDropRNG ()
Sprite & | GetSprite ()
EntityPlayer | ToPlayer ()
EntityEffect | ToEffect ()
EntityNPC | ToNPC ()
EntityPickup | ToPickup ()
EntityFamiliar | ToFamiliar ()
EntityBomb | ToBomb ()
EntityKnife | ToKnife ()
EntityLaser | ToLaser ()
EntityTear | ToTear ()
EntityProjectile | ToProjectile ()

## Public Attributes
float | Friction
| loaded from entity config More...
Vector | Position
Vector | Velocity
const EntityType | Type
integer | Variant
| void SetType(eEntityType Type); More...
integer | SubType
EntityType | SpawnerType
integer | SpawnerVariant
const KColor & | SplatColor
boolean | Visible
const Vector & | PositionOffset
integer | RenderZOffset
boolean | FlipX
const Vector & | SpriteOffset
const Vector & | SpriteScale
float | SpriteRotation
Vector | SizeMulti
float | Mass
float | MaxHitPoints
float | HitPoints
const integer | Index
const Vector & | TargetPosition
GridCollisionClass | GridCollisionClass
EntityCollisionClass | EntityCollisionClass
float | CollisionDamage
const integer | SpawnGridIndex
Entity & | Parent
Entity & | Child
Entity & | Target
Entity & | SpawnerEntity
const integer | FrameCount
const integer | InitSeed
const integer | DropSeed
float | DepthOffset

## Member Function Documentation

## ◆ AddBurn()

Entity::AddBurn | ( | EntityRef | Source,
|  | integer | Duration,
|  | float | Damage
| ) |  |

## ◆ AddCharmed()

Entity::AddCharmed | ( | integer | Duration | ) |

## ◆ AddConfusion()

Entity::AddConfusion | ( | EntityRef | Source,
|  | integer | Duration,
|  | boolean | IgnoreBosses
| ) |  |

## ◆ AddEntityFlags()

Entity::AddEntityFlags | ( | integer | Flags | ) |

## ◆ AddFear()

Entity::AddFear | ( | EntityRef | Source,
|  | integer | Duration
| ) |  |

## ◆ AddFreeze()

Entity::AddFreeze | ( | EntityRef | Source,
|  | integer | Duration
| ) |  |

## ◆ AddHealth()

Entity::AddHealth | ( | float | HitPoints | ) |

## ◆ AddMidasFreeze()

Entity::AddMidasFreeze | ( | EntityRef | Source,
|  | integer | Duration
| ) |  |

## ◆ AddPoison()

Entity::AddPoison | ( | EntityRef | Source,
|  | integer | Duration,
|  | float | Damage
| ) |  |

## ◆ AddShrink()

Entity::AddShrink | ( | EntityRef | Source,
|  | integer | Duration
| ) |  |

## ◆ AddSlowing()

Entity::AddSlowing | ( | EntityRef | Source,
|  | integer | Duration,
|  | float | SlowValue,
|  | KColor | SlowColor
| ) |  |

Makes the friction higher.

## ◆ AddVelocity()

Entity::AddVelocity | ( | Vector | Velocity | ) |

## ◆ BloodExplode()

Entity::BloodExplode | ( |  | ) |

Explodes with gibs and blood.

## ◆ CanShutDoors()

boolean Entity::CanShutDoors | ( |  | ) |

enemies keep the doors shut

## ◆ ClearEntityFlags()

Entity::ClearEntityFlags | ( | integer | Flags | ) |

## ◆ CollidesWithGrid()

boolean Entity::CollidesWithGrid | ( |  | ) |

## ◆ Die()

Entity::Die | ( |  | ) |

## ◆ Exists()

boolean Entity::Exists | ( |  | ) |

## ◆ GetBossID()

BossId Entity::GetBossID | ( |  | ) |

## ◆ GetColor()

const KColor& Entity::GetColor | ( |  | ) |

## ◆ GetData()

table Entity::GetData | ( |  | ) |

## ◆ GetDropRNG()

RNG& Entity::GetDropRNG | ( |  | ) |

## ◆ GetEntityFlags()

integer Entity::GetEntityFlags | ( |  | ) |

## ◆ GetLastChild()

Entity& Entity::GetLastChild | ( |  | ) |

## ◆ GetLastParent()

Entity& Entity::GetLastParent | ( |  | ) |

## ◆ GetSprite()

Sprite& Entity::GetSprite | ( |  | ) |

## ◆ HasCommonParentWithEntity()

boolean Entity::HasCommonParentWithEntity | ( | Entity | Other | ) |

## ◆ HasEntityFlags()

boolean Entity::HasEntityFlags | ( | integer | Flags | ) |

## ◆ HasFullHealth()

boolean Entity::HasFullHealth | ( |  | ) |

## ◆ HasMortalDamage()

boolean Entity::HasMortalDamage | ( |  | ) |

## ◆ IsActiveEnemy()

boolean Entity::IsActiveEnemy | ( | boolean | includeDead | ) |

return true for non background NPCs (ex: every enemy except fire and shopkeepers)

## ◆ IsBoss()

boolean Entity::IsBoss | ( |  | ) |

bosses display health bar

## ◆ IsDead()

boolean Entity::IsDead | ( |  | ) |

## ◆ IsEnemy()

boolean Entity::IsEnemy | ( |  | ) |

return true for NPCs that are not controlled by the player

## ◆ IsFlying()

boolean Entity::IsFlying | ( |  | ) |

## ◆ IsFrame()

boolean Entity::IsFrame | ( | integer | Frame,
|  | integer | Offset
| ) |  |

true every X frames

## ◆ IsInvincible()

boolean Entity::IsInvincible | ( |  | ) |

## ◆ IsVisible()

boolean Entity::IsVisible | ( |  | ) |

## ◆ IsVulnerableEnemy()

boolean Entity::IsVulnerableEnemy | ( |  | ) |

return true for enemies that can be damaged

## ◆ Kill()

Entity::Kill | ( |  | ) |

Kills the entity and makes a blood splat or gibs.

## ◆ MultiplyFriction()

Entity::MultiplyFriction | ( | float | Value | ) |

## ◆ PostRender()

Entity::PostRender | ( |  | ) |

## ◆ Remove()

Entity::Remove | ( |  | ) |

Makes the entity dead remove the entity from the game instantly, without doing any additional effects/animation

## ◆ RemoveStatusEffects()

Entity::RemoveStatusEffects | ( |  | ) |

## ◆ Render()

Entity::Render | ( | Vector | Offset | ) |

## ◆ RenderShadowLayer()

boolean Entity::RenderShadowLayer | ( | Vector | Offset | ) |

## ◆ SetColor()

Entity::SetColor | ( | KColor | KColor,
|  | integer | Duration,
|  | integer | Priority,
|  | boolean | Fadeout,
|  | boolean | Share
| ) |  |

## ◆ SetSize()

Entity::SetSize | ( | float | Size,
|  | Vector | SizeMulti,
|  | integer | NumGridCollisionPoints
| ) |  |

## ◆ SetSpriteFrame()

Entity::SetSpriteFrame | ( | string | AnimationName,
|  | integer | FrameNum
| ) |  |

## ◆ SetSpriteOverlayFrame()

Entity::SetSpriteOverlayFrame | ( | string | AnimationName,
|  | integer | FrameNum
| ) |  |

## ◆ TakeDamage()

boolean Entity::TakeDamage | ( | float | Damage,
|  | integer | Flags,
|  | EntityRef | Source,
|  | integer | DamageCountdown
| ) |  |

## ◆ ToBomb()

EntityBomb Entity::ToBomb | ( |  | ) |

## ◆ ToEffect()

EntityEffect Entity::ToEffect | ( |  | ) |

## ◆ ToFamiliar()

EntityFamiliar Entity::ToFamiliar | ( |  | ) |

## ◆ ToKnife()

EntityKnife Entity::ToKnife | ( |  | ) |

## ◆ ToLaser()

EntityLaser Entity::ToLaser | ( |  | ) |

## ◆ ToNPC()

EntityNPC Entity::ToNPC | ( |  | ) |

## ◆ ToPickup()

EntityPickup Entity::ToPickup | ( |  | ) |

## ◆ ToPlayer()

EntityPlayer Entity::ToPlayer | ( |  | ) |

## ◆ ToProjectile()

EntityProjectile Entity::ToProjectile | ( |  | ) |

## ◆ ToTear()

EntityTear Entity::ToTear | ( |  | ) |

## ◆ Update()

Entity::Update | ( |  | ) |

## Member Data Documentation

## ◆ Child

Entity& Entity::Child

## ◆ CollisionDamage

float Entity::CollisionDamage

## ◆ DepthOffset

float Entity::DepthOffset

## ◆ DropSeed

const integer Entity::DropSeed

## ◆ EntityCollisionClass

EntityCollisionClass Entity::EntityCollisionClass

## ◆ FlipX

boolean Entity::FlipX

## ◆ FrameCount

const integer Entity::FrameCount

## ◆ Friction

float Entity::Friction

loaded from entity config

## ◆ GridCollisionClass

GridCollisionClass Entity::GridCollisionClass

## ◆ HitPoints

float Entity::HitPoints

## ◆ Index

const integer Entity::Index

## ◆ InitSeed

const integer Entity::InitSeed

## ◆ Mass

float Entity::Mass

## ◆ MaxHitPoints

float Entity::MaxHitPoints

## ◆ Parent

Entity& Entity::Parent

## ◆ Position

Vector Entity::Position

## ◆ PositionOffset

const Vector& Entity::PositionOffset

## ◆ RenderZOffset

integer Entity::RenderZOffset

## ◆ SizeMulti

Vector Entity::SizeMulti

## ◆ SpawnerEntity

Entity& Entity::SpawnerEntity

## ◆ SpawnerType

EntityType Entity::SpawnerType

## ◆ SpawnerVariant

integer Entity::SpawnerVariant

## ◆ SpawnGridIndex

const integer Entity::SpawnGridIndex

## ◆ SplatColor

const KColor& Entity::SplatColor

## ◆ SpriteOffset

const Vector& Entity::SpriteOffset

## ◆ SpriteRotation

float Entity::SpriteRotation

## ◆ SpriteScale

const Vector& Entity::SpriteScale

## ◆ SubType

integer Entity::SubType

## ◆ Target

Entity& Entity::Target

## ◆ TargetPosition

const Vector& Entity::TargetPosition

## ◆ Type

const EntityType Entity::Type

## ◆ Variant

integer Entity::Variant

void SetType(eEntityType Type);

## ◆ Velocity

Vector Entity::Velocity

## ◆ Visible

boolean Entity::Visible