Baldi's Basics Plus Glue API
Modding API for Baldi's Basics Plus
Loading...
Searching...
No Matches
BBPGlue.API.BBPEntity Class Referencesealed

Wrapper around game entity objects exposing common state and control methods. More...

Public Member Functions

GameObjectAudioGameObject ()
 Returns the GameObject used for audio playback associated with this entity.
 BBPEntity (object? raw)
 Creates a new entity wrapper for the provided raw object.
bool CanCollideWith (BBPEntity other)
 Returns whether this entity can collide with another entity.
bool CollisionValid (BBPEntity other)
 Returns whether a collision with the other entity would be valid.
void Enable (bool value)
 Enables or disables the entity's behavior.
void Flip ()
 Flips the entity horizontally.
void IgnoreEntity (BBPEntity other, bool value)
 Adds or removes the other entity from this entity's ignore list.
bool IsIgnoring (BBPEntity other)
 Returns whether this entity is ignoring the other entity.
void KillAllForces ()
 Removes all forces acting on the entity.
void MoveWithCollision (Vector3 movement)
 Moves the entity while performing collision checks.
void SetActive (bool value)
 Activates or deactivates the entity.
void SetBaseAnimationMultiplier (float value)
 Sets a base multiplier applied to animations.
void SetBlinded (bool value)
 Sets whether the entity is blinded.
void SetFrozen (bool value)
 Sets the entity's frozen state.
void SetGrounded (bool value)
 Sets whether the entity is grounded.
void SetHeight (float height)
 Sets the entity's collision height.
void SetHidden (bool value)
 Sets the entity's hidden state.
void SetInteractionEnabled (bool value)
 Enables or disables interactions for the entity.
void SetResistAddend (bool value)
 Sets an additive resistance flag for the entity.
void SetSpriteRotation (float degrees)
 Rotates the sprite representation of the entity.
void SetTargetLayer (int layer)
 Changes the target rendering/interaction layer for the entity.
void SetTrigger (bool value)
 Sets whether the entity's collider acts as a trigger.
void SetVerticalScale (float factor)
 Sets vertical scaling factor applied to the entity.
void SetVisible (bool value)
 Sets whether the entity is visible.
void Squish (float time)
 Squishes the entity for the specified duration.
void Teleport (Vector3 position)
 Teleports the entity to the specified world position.
void Unsquish ()
 Reverses a previous squish effect.
void UpdateAudioState ()
 Refreshes audio-related state.
void UpdateInternalMovement (Vector3 movement)
 Updates the internal movement vector used by the entity.
void UpdateState ()
 Requests the entity update its internal state.
void UpdateVisibility ()
 Refreshes visibility-related state.

Properties

float BaseHeight [get]
 Base height of the entity for collision purposes.
bool Blinded [get]
 Whether the entity is blinded.
Component? Component [get]
 Unity Component wrapper for the entity, if available.
object? CurrentRoom [get]
 Current room object containing this entity.
object? EnvironmentController [get]
 Reference to the environment controller the entity is bound to.
bool Exists [get]
 True when the underlying raw object is not null.
object? ExternalActivity [get]
 External activity object if present.
bool Flipped [get]
 Whether the entity is flipped horizontally.
bool Frozen [get]
 Whether the entity is frozen.
GameObject? GameObject [get]
 Unity GameObject for the entity, if available.
bool Grounded [get]
 Whether the entity is currently grounded.
bool Hidden [get]
 Whether the entity is hidden.
bool InBounds [get]
 Whether the entity is within valid bounds.
bool InteractionDisabled [get]
 Whether interactions are disabled for the entity.
float InternalHeight [get]
 Internal height used by physics calculations.
float InternalHeightWithScaleFactor [get]
 Internal height taking scale factor into account.
Vector3 InternalMovement [get]
 Movement vector used internally by the entity.
Vector3 Position [get, set]
 World position of the entity.
object? Raw [get]
 The underlying raw game entity object wrapped by this instance.
Vector3 RelativeToForcedVelocity [get]
 Velocity relative to forced motion applied to the entity.
bool Squished [get]
 Whether the entity is squished.
bool TotallyActive [get]
 Whether the entity is considered fully active by the game logic.
Transform? Transform [get]
 Unity Transform for the entity, if available.
Collider? Trigger [get]
 Collider used as the entity's trigger.
Vector3 Velocity [get]
 Current velocity of the entity.
bool Visible [get]
 Whether the entity is visible.

Detailed Description

Wrapper around game entity objects exposing common state and control methods.

Constructor & Destructor Documentation

◆ BBPEntity()

BBPGlue.API.BBPEntity.BBPEntity ( object? raw)

Creates a new entity wrapper for the provided raw object.

Parameters
rawThe raw entity object or null.

Member Function Documentation

◆ AudioGameObject()

GameObject? BBPGlue.API.BBPEntity.AudioGameObject ( )

Returns the GameObject used for audio playback associated with this entity.

◆ CanCollideWith()

bool BBPGlue.API.BBPEntity.CanCollideWith ( BBPEntity other)

Returns whether this entity can collide with another entity.

◆ CollisionValid()

bool BBPGlue.API.BBPEntity.CollisionValid ( BBPEntity other)

Returns whether a collision with the other entity would be valid.

◆ Enable()

void BBPGlue.API.BBPEntity.Enable ( bool value)

Enables or disables the entity's behavior.

◆ Flip()

void BBPGlue.API.BBPEntity.Flip ( )

Flips the entity horizontally.

◆ IgnoreEntity()

void BBPGlue.API.BBPEntity.IgnoreEntity ( BBPEntity other,
bool value )

Adds or removes the other entity from this entity's ignore list.

◆ IsIgnoring()

bool BBPGlue.API.BBPEntity.IsIgnoring ( BBPEntity other)

Returns whether this entity is ignoring the other entity.

◆ KillAllForces()

void BBPGlue.API.BBPEntity.KillAllForces ( )

Removes all forces acting on the entity.

◆ MoveWithCollision()

void BBPGlue.API.BBPEntity.MoveWithCollision ( Vector3 movement)

Moves the entity while performing collision checks.

Parameters
movementMovement vector to apply.

◆ SetActive()

void BBPGlue.API.BBPEntity.SetActive ( bool value)

Activates or deactivates the entity.

Parameters
valueTrue to activate; false to deactivate.

◆ SetBaseAnimationMultiplier()

void BBPGlue.API.BBPEntity.SetBaseAnimationMultiplier ( float value)

Sets a base multiplier applied to animations.

◆ SetBlinded()

void BBPGlue.API.BBPEntity.SetBlinded ( bool value)

Sets whether the entity is blinded.

Parameters
valueTrue to blind; false to unblind.

◆ SetFrozen()

void BBPGlue.API.BBPEntity.SetFrozen ( bool value)

Sets the entity's frozen state.

Parameters
valueTrue to freeze; false to unfreeze.

◆ SetGrounded()

void BBPGlue.API.BBPEntity.SetGrounded ( bool value)

Sets whether the entity is grounded.

◆ SetHeight()

void BBPGlue.API.BBPEntity.SetHeight ( float height)

Sets the entity's collision height.

◆ SetHidden()

void BBPGlue.API.BBPEntity.SetHidden ( bool value)

Sets the entity's hidden state.

◆ SetInteractionEnabled()

void BBPGlue.API.BBPEntity.SetInteractionEnabled ( bool value)

Enables or disables interactions for the entity.

Parameters
valueTrue to enable; false to disable.

◆ SetResistAddend()

void BBPGlue.API.BBPEntity.SetResistAddend ( bool value)

Sets an additive resistance flag for the entity.

◆ SetSpriteRotation()

void BBPGlue.API.BBPEntity.SetSpriteRotation ( float degrees)

Rotates the sprite representation of the entity.

◆ SetTargetLayer()

void BBPGlue.API.BBPEntity.SetTargetLayer ( int layer)

Changes the target rendering/interaction layer for the entity.

◆ SetTrigger()

void BBPGlue.API.BBPEntity.SetTrigger ( bool value)

Sets whether the entity's collider acts as a trigger.

◆ SetVerticalScale()

void BBPGlue.API.BBPEntity.SetVerticalScale ( float factor)

Sets vertical scaling factor applied to the entity.

◆ SetVisible()

void BBPGlue.API.BBPEntity.SetVisible ( bool value)

Sets whether the entity is visible.

◆ Squish()

void BBPGlue.API.BBPEntity.Squish ( float time)

Squishes the entity for the specified duration.

◆ Teleport()

void BBPGlue.API.BBPEntity.Teleport ( Vector3 position)

Teleports the entity to the specified world position.

Parameters
positionDestination position.

◆ Unsquish()

void BBPGlue.API.BBPEntity.Unsquish ( )

Reverses a previous squish effect.

◆ UpdateAudioState()

void BBPGlue.API.BBPEntity.UpdateAudioState ( )

Refreshes audio-related state.

◆ UpdateInternalMovement()

void BBPGlue.API.BBPEntity.UpdateInternalMovement ( Vector3 movement)

Updates the internal movement vector used by the entity.

Parameters
movementMovement vector to set.

◆ UpdateState()

void BBPGlue.API.BBPEntity.UpdateState ( )

Requests the entity update its internal state.

◆ UpdateVisibility()

void BBPGlue.API.BBPEntity.UpdateVisibility ( )

Refreshes visibility-related state.

Property Documentation

◆ BaseHeight

float BBPGlue.API.BBPEntity.BaseHeight
get

Base height of the entity for collision purposes.

◆ Blinded

bool BBPGlue.API.BBPEntity.Blinded
get

Whether the entity is blinded.

◆ Component

Component? BBPGlue.API.BBPEntity.Component
get

Unity Component wrapper for the entity, if available.

◆ CurrentRoom

object? BBPGlue.API.BBPEntity.CurrentRoom
get

Current room object containing this entity.

◆ EnvironmentController

object? BBPGlue.API.BBPEntity.EnvironmentController
get

Reference to the environment controller the entity is bound to.

◆ Exists

bool BBPGlue.API.BBPEntity.Exists
get

True when the underlying raw object is not null.

◆ ExternalActivity

object? BBPGlue.API.BBPEntity.ExternalActivity
get

External activity object if present.

◆ Flipped

bool BBPGlue.API.BBPEntity.Flipped
get

Whether the entity is flipped horizontally.

◆ Frozen

bool BBPGlue.API.BBPEntity.Frozen
get

Whether the entity is frozen.

◆ GameObject

GameObject? BBPGlue.API.BBPEntity.GameObject
get

Unity GameObject for the entity, if available.

◆ Grounded

bool BBPGlue.API.BBPEntity.Grounded
get

Whether the entity is currently grounded.

◆ Hidden

bool BBPGlue.API.BBPEntity.Hidden
get

Whether the entity is hidden.

◆ InBounds

bool BBPGlue.API.BBPEntity.InBounds
get

Whether the entity is within valid bounds.

◆ InteractionDisabled

bool BBPGlue.API.BBPEntity.InteractionDisabled
get

Whether interactions are disabled for the entity.

◆ InternalHeight

float BBPGlue.API.BBPEntity.InternalHeight
get

Internal height used by physics calculations.

◆ InternalHeightWithScaleFactor

float BBPGlue.API.BBPEntity.InternalHeightWithScaleFactor
get

Internal height taking scale factor into account.

◆ InternalMovement

Vector3 BBPGlue.API.BBPEntity.InternalMovement
get

Movement vector used internally by the entity.

◆ Position

Vector3 BBPGlue.API.BBPEntity.Position
getset

World position of the entity.

Setting will teleport the entity.

◆ Raw

object? BBPGlue.API.BBPEntity.Raw
get

The underlying raw game entity object wrapped by this instance.

◆ RelativeToForcedVelocity

Vector3 BBPGlue.API.BBPEntity.RelativeToForcedVelocity
get

Velocity relative to forced motion applied to the entity.

◆ Squished

bool BBPGlue.API.BBPEntity.Squished
get

Whether the entity is squished.

◆ TotallyActive

bool BBPGlue.API.BBPEntity.TotallyActive
get

Whether the entity is considered fully active by the game logic.

◆ Transform

Transform? BBPGlue.API.BBPEntity.Transform
get

Unity Transform for the entity, if available.

◆ Trigger

Collider? BBPGlue.API.BBPEntity.Trigger
get

Collider used as the entity's trigger.

◆ Velocity

Vector3 BBPGlue.API.BBPEntity.Velocity
get

Current velocity of the entity.

◆ Visible

bool BBPGlue.API.BBPEntity.Visible
get

Whether the entity is visible.


The documentation for this class was generated from the following file: