Binding of Isaac - Afterbirth+ Lua Reference/Guide

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

## Public Member Functions
| SetTimeout (integer Value)
| SetActiveRotation (integer Delay, float AngleDegrees, float RotationSpd, boolean TimeoutComplete)
integer | GetRenderZ ()
const Vector & | GetEndPoint ()
boolean | IsSampleLaser ()
const HomingLaser::SampleList & | GetSamples ()
const HomingLaser::SampleList & | GetNonOptimizedSamples ()
| SetOneHit (boolean Value)
| SetHomingType (LaserHomingType Type)
| SetMaxDistance (float Distance)
boolean | IsCircleLaser ()
| SetBlackHpDropChance (float Chance)
| SetMultidimensionalTouched (boolean Value)
Public Member Functions inherited from Entity
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 ()

## Static Public Member Functions
static EntityLaser & | ShootAngle (integer Variant, Vector SourcePos, float AngleDegrees, integer Timeout, Vector PosOffset, Entity Source)
| static helper to simplify spawning lasers More...
static Vector | CalculateEndPoint (Vector Start, Vector Dir, Vector PositionOffset, Entity Parent, float Margin)

## Public Attributes
integer | TearFlags
| float m_DepthOffset; More...
float | Angle
float | Radius
Vector | ParentOffset
float | StartAngleDegrees
| Some lasers have a bit of random variation in rotation so they need to remember their starting point. More...
float | AngleDegrees
float | LastAngleDegrees
integer | Timeout
boolean | FirstUpdate
boolean | SampleLaser
boolean | Shrink
float | LaserLength
HomingLaser | HomingLaser
float | CurveStrength
| My Reflection. More...
boolean | IsActiveRotating
integer | RotationDelay
float | RotationDegrees
float | RotationSpd
float | MaxDistance
| Used to trim brimstone for Azazel (0 - off) More...
LaserHomingType | HomingType
Vector | EndPoint
| Will hold the endpoint so it will not need to be recalculated when accessed from extern. More...
boolean | DisableFollowParent
| Set on children of other lasers, for instance Rubber Cement reflections. Disables m_ParentOffset. More...
Entity & | BounceLaser
float | BlackHpDropChance
| For maw of void. More...
boolean | OneHit
| Laser hits only once. More...
boolean | GridHit
| true if laser can be clipped by grid entities and it was clipped at that frame. More...
Public Attributes inherited from Entity
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

## ◆ CalculateEndPoint()

static Vector EntityLaser::CalculateEndPoint | ( | Vector | Start,
|  | Vector | Dir,
|  | Vector | PositionOffset,
|  | Entity | Parent,
|  | float | Margin
| ) |  |
| static

## ◆ GetEndPoint()

const Vector& EntityLaser::GetEndPoint | ( |  | ) |

## ◆ GetNonOptimizedSamples()

const HomingLaser::SampleList& EntityLaser::GetNonOptimizedSamples | ( |  | ) |

## ◆ GetRenderZ()

integer EntityLaser::GetRenderZ | ( |  | ) |

## ◆ GetSamples()

const HomingLaser::SampleList& EntityLaser::GetSamples | ( |  | ) |

## ◆ IsCircleLaser()

boolean EntityLaser::IsCircleLaser | ( |  | ) |

## ◆ IsSampleLaser()

boolean EntityLaser::IsSampleLaser | ( |  | ) |

## ◆ SetActiveRotation()

EntityLaser::SetActiveRotation | ( | integer | Delay,
|  | float | AngleDegrees,
|  | float | RotationSpd,
|  | boolean | TimeoutComplete
| ) |  |

## ◆ SetBlackHpDropChance()

EntityLaser::SetBlackHpDropChance | ( | float | Chance | ) |

## ◆ SetHomingType()

EntityLaser::SetHomingType | ( | LaserHomingType | Type | ) |

## ◆ SetMaxDistance()

EntityLaser::SetMaxDistance | ( | float | Distance | ) |

## ◆ SetMultidimensionalTouched()

EntityLaser::SetMultidimensionalTouched | ( | boolean | Value | ) |

## ◆ SetOneHit()

EntityLaser::SetOneHit | ( | boolean | Value | ) |

## ◆ SetTimeout()

EntityLaser::SetTimeout | ( | integer | Value | ) |

## ◆ ShootAngle()

static EntityLaser& EntityLaser::ShootAngle | ( | integer | Variant,
|  | Vector | SourcePos,
|  | float | AngleDegrees,
|  | integer | Timeout,
|  | Vector | PosOffset,
|  | Entity | Source
| ) |  |
| static

static helper to simplify spawning lasers

## Member Data Documentation

## ◆ Angle

float EntityLaser::Angle

## ◆ AngleDegrees

float EntityLaser::AngleDegrees

## ◆ BlackHpDropChance

float EntityLaser::BlackHpDropChance

For maw of void.

## ◆ BounceLaser

Entity& EntityLaser::BounceLaser

## ◆ CurveStrength

float EntityLaser::CurveStrength

My Reflection.

## ◆ DisableFollowParent

boolean EntityLaser::DisableFollowParent

Set on children of other lasers, for instance Rubber Cement reflections. Disables m_ParentOffset.

## ◆ EndPoint

Vector EntityLaser::EndPoint

Will hold the endpoint so it will not need to be recalculated when accessed from extern.

## ◆ FirstUpdate

boolean EntityLaser::FirstUpdate

## ◆ GridHit

boolean EntityLaser::GridHit

true if laser can be clipped by grid entities and it was clipped at that frame.

## ◆ HomingLaser

HomingLaser EntityLaser::HomingLaser

## ◆ HomingType

LaserHomingType EntityLaser::HomingType

## ◆ IsActiveRotating

boolean EntityLaser::IsActiveRotating

## ◆ LaserLength

float EntityLaser::LaserLength

## ◆ LastAngleDegrees

float EntityLaser::LastAngleDegrees

## ◆ MaxDistance

float EntityLaser::MaxDistance

Used to trim brimstone for Azazel (0 - off)

## ◆ OneHit

boolean EntityLaser::OneHit

Laser hits only once.

## ◆ ParentOffset

Vector EntityLaser::ParentOffset

## ◆ Radius

float EntityLaser::Radius

## ◆ RotationDegrees

float EntityLaser::RotationDegrees

## ◆ RotationDelay

integer EntityLaser::RotationDelay

## ◆ RotationSpd

float EntityLaser::RotationSpd

## ◆ SampleLaser

boolean EntityLaser::SampleLaser

## ◆ Shrink

boolean EntityLaser::Shrink

## ◆ StartAngleDegrees

float EntityLaser::StartAngleDegrees

Some lasers have a bit of random variation in rotation so they need to remember their starting point.

## ◆ TearFlags

integer EntityLaser::TearFlags

float m_DepthOffset;

float GetDepthOffset(void) const { return m_DepthOffset; } void SetDepthOffset(float Value) { m_DepthOffset = Value; }

## ◆ Timeout

integer EntityLaser::Timeout