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

Wraps the BB+ Dr. More...

Inheritance diagram for BBPGlue.API.BBPDrReflex:

Public Member Functions

 BBPDrReflex (object? raw)
 Creates a Dr.
bool CalloutChance (bool happy)
 Runs Dr.
void ClearDestination ()
 Clears the NPC's current destination.
void ClearGuilt ()
 Clears the NPC's guilt state.
void Despawn ()
 Despawns the NPC.
void DestinationEmpty ()
 Notifies the NPC that its destination is empty.
float DistanceCheck (float value)
 Calls the NPC distance check.
void EndTest (bool success, BBPPlayerRef player)
 Ends the current reflex test.
void FaceEntity (BBPEntity entity)
 Faces Dr.
bool FacingNextPoint ()
 Gets whether Dr.
bool FacingPlayer (BBPPlayerRef player)
 Gets whether Dr.
void FindPath (Vector3 start, Vector3 target)
 Finds a path from a custom start position to a target position.
void FindPath (Vector3 target)
 Finds a path to the target position.
void FindPathAvoid (Vector3 target, Vector3 avoid)
 Finds a path to the target while avoiding a position.
void Flip ()
 Flips the NPC entity.
void GetHammer ()
 Triggers Dr.
void Hammer (BBPEntity entity)
 Makes Dr.
void HammerCheck (BBPPlayerRef player)
 Runs Dr.
void HammerSound ()
 Plays Dr.
void HeadToOffice ()
 Sends Dr.
void Hear (GameObject source, Vector3 position, int value)
 Makes the NPC hear a sound.
void Hear (Vector3 position, int value)
 Makes the NPC hear a sound without a source GameObject.
void HotspotClicked (object side)
 Handles a clicked reflex hotspot.
void IncreasePitch ()
 Increases Dr.
void Initialize ()
 Initializes the NPC.
void KillAllForces ()
 Clears all forces applied to the NPC entity.
void MadeNavigationDecision ()
 Notifies the NPC that it made a navigation decision.
void ManuallyAppendDestinationPoint (Vector3 position)
 Appends a destination point to the NPC navigator.
void PauseAndTurn ()
 Pauses and turns Dr.
void PauseAndTurn (BBPPlayerRef player)
 Pauses and turns Dr.
bool PlayerLeft (BBPPlayerRef player)
 Returns true if the player left the reflex test range.
void Reset ()
 Resets Dr.
void ResetAnimationTriggers ()
 Resets Dr.
void ResetTest ()
 Resets the current reflex test.
void SentToDetention ()
 Calls the NPC detention handler.
void SetBlinded (bool blinded)
 Sets whether the NPC entity is blinded.
void SetFrozen (bool frozen)
 Freezes or unfreezes the NPC entity.
void SetHidden (bool hidden)
 Sets whether the NPC entity is hidden.
void SetRoomAvoidance (bool value)
 Enables or disables room avoidance for NPC pathfinding.
void SetSpeed (float speed)
 Sets the NPC navigator speed.
void SetSprite (Sprite sprite)
 Sets the sprite used by all NPC sprite renderers.
void SetSpriteBaseActive (bool active)
 Shows or hides the NPC sprite root object.
void SetSpriteColor (Color color)
 Sets the color used by all NPC sprite renderers.
void SetVerticalScale (float scale)
 Sets the NPC entity's vertical scale.
void SetVisible (bool visible)
 Sets whether the NPC entity is visible.
void Sighted ()
 Calls the NPC sighted handler.
void SkipCurrentDestinationPoint ()
 Skips the NPC navigator's current destination point.
void Squish (float time)
 Squishes the NPC entity for a duration.
void TargetPosition (Vector3 target)
 Sends a target position to the NPC.
void Teleport (Vector3 position)
 Teleports the NPC to a position.
void TeleportToPlayer ()
 Teleports the NPC to the player position.
void Unsighted ()
 Calls the NPC unsighted handler.
void Unsquish ()
 Removes the NPC entity's squished state.
void WanderRandom ()
 Makes the NPC wander to a random destination.
void WanderRounds ()
 Makes the NPC use its round-wandering behavior.

Properties

float Acceleration [get, set]
 Gets or sets the NPC navigator's acceleration.
Animator? Animator [get]
 Gets Dr.
BBPAudioManager Audio [get]
 Gets Dr.
Collider?[] BaseTriggers [get, set]
 Gets or sets the NPC base trigger colliders.
object? BehaviorStateMachine [get]
 Gets the NPC behavior state machine.
bool Blinded [get]
 Gets whether the NPC is blinded.
string BrokenRule [get]
 Gets the rule currently associated with this NPC.
float CalculatedSpeed [get]
 Gets the NPC's calculated speed from the game object.
string Character [get]
 Gets the NPC character identifier as text.
object? CharacterRaw [get, set]
 Gets or sets the raw character value.
float ChargeSpeed [get, set]
 Gets or sets Dr.
float Cooldown [get, set]
 Gets or sets Dr.
Vector3 CurrentDestination [get]
 Gets the NPC navigator's current destination.
bool Disobeying [get]
 Gets whether the NPC is currently disobeying.
BBPEntity Entity [get]
 Gets the entity component associated with this NPC.
object? EnvironmentController [get, set]
 Gets or sets the environment controller associated with this NPC.
bool Exists [get]
 Gets whether the wrapped NPC instance exists.
bool HasDestination [get]
 Gets whether the NPC navigator has a destination.
bool HasDetour [get]
 Gets whether the NPC currently has a detour.
float HuntSpeed [get, set]
 Gets or sets Dr.
bool IgnorePlayerOnSpawn [get, set]
 Gets or sets whether the NPC ignores the player immediately after spawning.
bool IsInOffice [get]
 Gets whether Dr.
Vector3 LastSightedPlayerLocation [get]
 Gets Dr.
object? Looker [get, set]
 Gets or sets the NPC looker component.
float MaxSpeed [get, set]
 Gets or sets the NPC navigator's maximum speed.
float MaxTestDistance [get, set]
 Gets or sets Dr.
string Name [get, set]
 Gets or sets the NPC GameObject name.
object? NavigationStateMachine [get]
 Gets the NPC navigation state machine.
object? Navigator [get]
 Gets the NPC navigator.
Vector3 NextPoint [get]
 Gets the next point in the NPC navigator's path.
int NoiseValue [get, set]
 Gets or sets Dr.
Vector3 Position [get, set]
 Gets or sets the NPC position in world space.
object? Poster [get, set]
 Gets or sets the NPC poster object.
object? PotentialRoomAssets [get, set]
 Gets or sets the NPC potential room assets.
float Radius [get, set]
 Gets or sets the NPC navigator radius.
object? Raw [get]
 Gets the raw underlying NPC instance.
float RoomWanderCycle [get]
 Gets Dr.
Quaternion Rotation [get, set]
 Gets or sets the NPC rotation in world space.
IList? SpawnableRooms [get]
 Gets the rooms this NPC can spawn in.
GameObject? SpriteBase [get, set]
 Gets or sets the root GameObject for the NPC sprites.
SpriteRenderer?[] SpriteRenderers [get, set]
 Gets or sets the NPC sprite renderers.
float SquishTime [get, set]
 Gets or sets the squish duration applied by Dr.
float TimeScale [get]
 Gets the NPC's current time scale.
bool Turning [get]
 Gets whether Dr.
float TurnSpeed [get, set]
 Gets or sets Dr.
Vector3 Velocity [get]
 Gets the NPC navigator's current velocity.
bool Wandering [get]
 Gets whether the NPC is currently wandering.
float WanderSpeed [get, set]
 Gets or sets Dr.

Detailed Description

Wraps the BB+ Dr.

Reflex NPC and exposes reflex test, hammer, animation, audio, and movement helpers.

Constructor & Destructor Documentation

◆ BBPDrReflex()

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

Creates a Dr.

Reflex wrapper around a raw DrReflex instance.

Parameters
rawThe raw DrReflex object or component.

Member Function Documentation

◆ CalloutChance()

bool BBPGlue.API.BBPDrReflex.CalloutChance ( bool happy)

Runs Dr.

Reflex's callout chance.

Parameters
happyTrue for happy callouts; false for angry callouts.
Returns
True if a callout was played.

◆ ClearDestination()

void BBPGlue.API.BBPNpc.ClearDestination ( )
inherited

Clears the NPC's current destination.

◆ ClearGuilt()

void BBPGlue.API.BBPNpc.ClearGuilt ( )
inherited

Clears the NPC's guilt state.

◆ Despawn()

void BBPGlue.API.BBPNpc.Despawn ( )
inherited

Despawns the NPC.

◆ DestinationEmpty()

void BBPGlue.API.BBPNpc.DestinationEmpty ( )
inherited

Notifies the NPC that its destination is empty.

◆ DistanceCheck()

float BBPGlue.API.BBPNpc.DistanceCheck ( float value)
inherited

Calls the NPC distance check.

Parameters
valueThe value to pass to the game method.
Returns
The value returned by the game method.

◆ EndTest()

void BBPGlue.API.BBPDrReflex.EndTest ( bool success,
BBPPlayerRef player )

Ends the current reflex test.

Parameters
successTrue if the player succeeded.
playerThe tested player.

◆ FaceEntity()

void BBPGlue.API.BBPDrReflex.FaceEntity ( BBPEntity entity)

Faces Dr.

Reflex toward an entity.

Parameters
entityThe entity to face.

◆ FacingNextPoint()

bool BBPGlue.API.BBPDrReflex.FacingNextPoint ( )

Gets whether Dr.

Reflex is facing his next navigation point.

◆ FacingPlayer()

bool BBPGlue.API.BBPDrReflex.FacingPlayer ( BBPPlayerRef player)

Gets whether Dr.

Reflex is facing the given player.

Parameters
playerThe player to check.

◆ FindPath() [1/2]

void BBPGlue.API.BBPNpc.FindPath ( Vector3 start,
Vector3 target )
inherited

Finds a path from a custom start position to a target position.

Parameters
startThe start position.
targetThe target position.

◆ FindPath() [2/2]

void BBPGlue.API.BBPNpc.FindPath ( Vector3 target)
inherited

Finds a path to the target position.

Parameters
targetThe target position.

◆ FindPathAvoid()

void BBPGlue.API.BBPNpc.FindPathAvoid ( Vector3 target,
Vector3 avoid )
inherited

Finds a path to the target while avoiding a position.

Parameters
targetThe target position.
avoidThe position to avoid.

◆ Flip()

void BBPGlue.API.BBPNpc.Flip ( )
inherited

Flips the NPC entity.

◆ GetHammer()

void BBPGlue.API.BBPDrReflex.GetHammer ( )

Triggers Dr.

Reflex's hammer acquired animation.

◆ Hammer()

void BBPGlue.API.BBPDrReflex.Hammer ( BBPEntity entity)

Makes Dr.

Reflex hammer an entity.

Parameters
entityThe entity to hammer.

◆ HammerCheck()

void BBPGlue.API.BBPDrReflex.HammerCheck ( BBPPlayerRef player)

Runs Dr.

Reflex's hammer collision check against a player.

Parameters
playerThe target player.

◆ HammerSound()

void BBPGlue.API.BBPDrReflex.HammerSound ( )

Plays Dr.

Reflex's hammer sound.

◆ HeadToOffice()

void BBPGlue.API.BBPDrReflex.HeadToOffice ( )

Sends Dr.

Reflex back to his office.

◆ Hear() [1/2]

void BBPGlue.API.BBPNpc.Hear ( GameObject source,
Vector3 position,
int value )
inherited

Makes the NPC hear a sound.

Parameters
sourceThe sound source GameObject.
positionThe sound position.
valueThe sound value used by the game.

◆ Hear() [2/2]

void BBPGlue.API.BBPNpc.Hear ( Vector3 position,
int value )
inherited

Makes the NPC hear a sound without a source GameObject.

Parameters
positionThe sound position.
valueThe sound value used by the game.

◆ HotspotClicked()

void BBPGlue.API.BBPDrReflex.HotspotClicked ( object side)

Handles a clicked reflex hotspot.

Parameters
sideRaw BB+ Direction enum value.

◆ IncreasePitch()

void BBPGlue.API.BBPDrReflex.IncreasePitch ( )

Increases Dr.

Reflex's audio pitch during thinking.

◆ Initialize()

void BBPGlue.API.BBPNpc.Initialize ( )
inherited

Initializes the NPC.

◆ KillAllForces()

void BBPGlue.API.BBPNpc.KillAllForces ( )
inherited

Clears all forces applied to the NPC entity.

◆ MadeNavigationDecision()

void BBPGlue.API.BBPNpc.MadeNavigationDecision ( )
inherited

Notifies the NPC that it made a navigation decision.

◆ ManuallyAppendDestinationPoint()

void BBPGlue.API.BBPNpc.ManuallyAppendDestinationPoint ( Vector3 position)
inherited

Appends a destination point to the NPC navigator.

Parameters
positionThe point to append.

◆ PauseAndTurn() [1/2]

void BBPGlue.API.BBPDrReflex.PauseAndTurn ( )

Pauses and turns Dr.

Reflex toward his navigation target.

◆ PauseAndTurn() [2/2]

void BBPGlue.API.BBPDrReflex.PauseAndTurn ( BBPPlayerRef player)

Pauses and turns Dr.

Reflex toward a player.

Parameters
playerThe player to face.

◆ PlayerLeft()

bool BBPGlue.API.BBPDrReflex.PlayerLeft ( BBPPlayerRef player)

Returns true if the player left the reflex test range.

Parameters
playerThe tested player.

◆ Reset()

void BBPGlue.API.BBPDrReflex.Reset ( )

Resets Dr.

Reflex to his base wandering/test state.

◆ ResetAnimationTriggers()

void BBPGlue.API.BBPDrReflex.ResetAnimationTriggers ( )

Resets Dr.

Reflex's animator triggers.

◆ ResetTest()

void BBPGlue.API.BBPDrReflex.ResetTest ( )

Resets the current reflex test.

◆ SentToDetention()

void BBPGlue.API.BBPNpc.SentToDetention ( )
inherited

Calls the NPC detention handler.

◆ SetBlinded()

void BBPGlue.API.BBPNpc.SetBlinded ( bool blinded)
inherited

Sets whether the NPC entity is blinded.

Parameters
blindedTrue to blind the NPC; false to restore sight.

◆ SetFrozen()

void BBPGlue.API.BBPNpc.SetFrozen ( bool frozen)
inherited

Freezes or unfreezes the NPC entity.

Parameters
frozenTrue to freeze the NPC; false to unfreeze it.

◆ SetHidden()

void BBPGlue.API.BBPNpc.SetHidden ( bool hidden)
inherited

Sets whether the NPC entity is hidden.

Parameters
hiddenTrue to hide the NPC; false to show it.

◆ SetRoomAvoidance()

void BBPGlue.API.BBPNpc.SetRoomAvoidance ( bool value)
inherited

Enables or disables room avoidance for NPC pathfinding.

Parameters
valueTrue to avoid rooms; otherwise, false.

◆ SetSpeed()

void BBPGlue.API.BBPNpc.SetSpeed ( float speed)
inherited

Sets the NPC navigator speed.

Parameters
speedThe speed to set.

◆ SetSprite()

void BBPGlue.API.BBPNpc.SetSprite ( Sprite sprite)
inherited

Sets the sprite used by all NPC sprite renderers.

Parameters
spriteThe sprite to use.

◆ SetSpriteBaseActive()

void BBPGlue.API.BBPNpc.SetSpriteBaseActive ( bool active)
inherited

Shows or hides the NPC sprite root object.

Parameters
activeTrue to show the sprite root; false to hide it.

◆ SetSpriteColor()

void BBPGlue.API.BBPNpc.SetSpriteColor ( Color color)
inherited

Sets the color used by all NPC sprite renderers.

Parameters
colorThe color to apply.

◆ SetVerticalScale()

void BBPGlue.API.BBPNpc.SetVerticalScale ( float scale)
inherited

Sets the NPC entity's vertical scale.

Parameters
scaleThe vertical scale value.

◆ SetVisible()

void BBPGlue.API.BBPNpc.SetVisible ( bool visible)
inherited

Sets whether the NPC entity is visible.

Parameters
visibleTrue to make the NPC visible; false to hide it.

◆ Sighted()

void BBPGlue.API.BBPNpc.Sighted ( )
inherited

Calls the NPC sighted handler.

◆ SkipCurrentDestinationPoint()

void BBPGlue.API.BBPNpc.SkipCurrentDestinationPoint ( )
inherited

Skips the NPC navigator's current destination point.

◆ Squish()

void BBPGlue.API.BBPNpc.Squish ( float time)
inherited

Squishes the NPC entity for a duration.

Parameters
timeThe duration in seconds.

◆ TargetPosition()

void BBPGlue.API.BBPNpc.TargetPosition ( Vector3 target)
inherited

Sends a target position to the NPC.

Parameters
targetThe target position.

◆ Teleport()

void BBPGlue.API.BBPNpc.Teleport ( Vector3 position)
inherited

Teleports the NPC to a position.

Parameters
positionThe target position.

◆ TeleportToPlayer()

void BBPGlue.API.BBPNpc.TeleportToPlayer ( )
inherited

Teleports the NPC to the player position.

◆ Unsighted()

void BBPGlue.API.BBPNpc.Unsighted ( )
inherited

Calls the NPC unsighted handler.

◆ Unsquish()

void BBPGlue.API.BBPNpc.Unsquish ( )
inherited

Removes the NPC entity's squished state.

◆ WanderRandom()

void BBPGlue.API.BBPNpc.WanderRandom ( )
inherited

Makes the NPC wander to a random destination.

◆ WanderRounds()

void BBPGlue.API.BBPNpc.WanderRounds ( )
inherited

Makes the NPC use its round-wandering behavior.

Property Documentation

◆ Acceleration

float BBPGlue.API.BBPNpc.Acceleration
getsetinherited

Gets or sets the NPC navigator's acceleration.

◆ Animator

Animator? BBPGlue.API.BBPDrReflex.Animator
get

Gets Dr.

Reflex's animator.

◆ Audio

BBPAudioManager BBPGlue.API.BBPDrReflex.Audio
get

Gets Dr.

Reflex's audio manager.

◆ BaseTriggers

Collider? [] BBPGlue.API.BBPNpc.BaseTriggers
getsetinherited

Gets or sets the NPC base trigger colliders.

◆ BehaviorStateMachine

object? BBPGlue.API.BBPNpc.BehaviorStateMachine
getinherited

Gets the NPC behavior state machine.

◆ Blinded

bool BBPGlue.API.BBPNpc.Blinded
getinherited

Gets whether the NPC is blinded.

◆ BrokenRule

string BBPGlue.API.BBPNpc.BrokenRule
getinherited

Gets the rule currently associated with this NPC.

◆ CalculatedSpeed

float BBPGlue.API.BBPNpc.CalculatedSpeed
getinherited

Gets the NPC's calculated speed from the game object.

◆ Character

string BBPGlue.API.BBPNpc.Character
getinherited

Gets the NPC character identifier as text.

◆ CharacterRaw

object? BBPGlue.API.BBPNpc.CharacterRaw
getsetinherited

Gets or sets the raw character value.

◆ ChargeSpeed

float BBPGlue.API.BBPDrReflex.ChargeSpeed
getset

Gets or sets Dr.

Reflex's charge speed.

◆ Cooldown

float BBPGlue.API.BBPDrReflex.Cooldown
getset

Gets or sets Dr.

Reflex's cooldown.

◆ CurrentDestination

Vector3 BBPGlue.API.BBPNpc.CurrentDestination
getinherited

Gets the NPC navigator's current destination.

◆ Disobeying

bool BBPGlue.API.BBPNpc.Disobeying
getinherited

Gets whether the NPC is currently disobeying.

◆ Entity

BBPEntity BBPGlue.API.BBPNpc.Entity
getinherited

Gets the entity component associated with this NPC.

◆ EnvironmentController

object? BBPGlue.API.BBPNpc.EnvironmentController
getsetinherited

Gets or sets the environment controller associated with this NPC.

◆ Exists

bool BBPGlue.API.BBPNpc.Exists
getinherited

Gets whether the wrapped NPC instance exists.

◆ HasDestination

bool BBPGlue.API.BBPNpc.HasDestination
getinherited

Gets whether the NPC navigator has a destination.

◆ HasDetour

bool BBPGlue.API.BBPNpc.HasDetour
getinherited

Gets whether the NPC currently has a detour.

◆ HuntSpeed

float BBPGlue.API.BBPDrReflex.HuntSpeed
getset

Gets or sets Dr.

Reflex's hunt speed.

◆ IgnorePlayerOnSpawn

bool BBPGlue.API.BBPNpc.IgnorePlayerOnSpawn
getsetinherited

Gets or sets whether the NPC ignores the player immediately after spawning.

◆ IsInOffice

bool BBPGlue.API.BBPDrReflex.IsInOffice
get

Gets whether Dr.

Reflex is currently in his office.

◆ LastSightedPlayerLocation

Vector3 BBPGlue.API.BBPDrReflex.LastSightedPlayerLocation
get

Gets Dr.

Reflex's last sighted player location.

◆ Looker

object? BBPGlue.API.BBPNpc.Looker
getsetinherited

Gets or sets the NPC looker component.

◆ MaxSpeed

float BBPGlue.API.BBPNpc.MaxSpeed
getsetinherited

Gets or sets the NPC navigator's maximum speed.

◆ MaxTestDistance

float BBPGlue.API.BBPDrReflex.MaxTestDistance
getset

Gets or sets Dr.

Reflex's maximum test distance.

◆ Name

string BBPGlue.API.BBPNpc.Name
getsetinherited

Gets or sets the NPC GameObject name.

◆ NavigationStateMachine

object? BBPGlue.API.BBPNpc.NavigationStateMachine
getinherited

Gets the NPC navigation state machine.

◆ Navigator

object? BBPGlue.API.BBPNpc.Navigator
getinherited

Gets the NPC navigator.

◆ NextPoint

Vector3 BBPGlue.API.BBPNpc.NextPoint
getinherited

Gets the next point in the NPC navigator's path.

◆ NoiseValue

int BBPGlue.API.BBPDrReflex.NoiseValue
getset

Gets or sets Dr.

Reflex's noise value.

◆ Position

Vector3 BBPGlue.API.BBPNpc.Position
getsetinherited

Gets or sets the NPC position in world space.

◆ Poster

object? BBPGlue.API.BBPNpc.Poster
getsetinherited

Gets or sets the NPC poster object.

◆ PotentialRoomAssets

object? BBPGlue.API.BBPNpc.PotentialRoomAssets
getsetinherited

Gets or sets the NPC potential room assets.

◆ Radius

float BBPGlue.API.BBPNpc.Radius
getsetinherited

Gets or sets the NPC navigator radius.

◆ Raw

object? BBPGlue.API.BBPNpc.Raw
getinherited

Gets the raw underlying NPC instance.

◆ RoomWanderCycle

float BBPGlue.API.BBPDrReflex.RoomWanderCycle
get

Gets Dr.

Reflex's room wander cycle duration.

◆ Rotation

Quaternion BBPGlue.API.BBPNpc.Rotation
getsetinherited

Gets or sets the NPC rotation in world space.

◆ SpawnableRooms

IList? BBPGlue.API.BBPNpc.SpawnableRooms
getinherited

Gets the rooms this NPC can spawn in.

◆ SpriteBase

GameObject? BBPGlue.API.BBPNpc.SpriteBase
getsetinherited

Gets or sets the root GameObject for the NPC sprites.

◆ SpriteRenderers

SpriteRenderer? [] BBPGlue.API.BBPNpc.SpriteRenderers
getsetinherited

Gets or sets the NPC sprite renderers.

◆ SquishTime

float BBPGlue.API.BBPDrReflex.SquishTime
getset

Gets or sets the squish duration applied by Dr.

Reflex's hammer.

◆ TimeScale

float BBPGlue.API.BBPNpc.TimeScale
getinherited

Gets the NPC's current time scale.

◆ Turning

bool BBPGlue.API.BBPDrReflex.Turning
get

Gets whether Dr.

Reflex is currently turning.

◆ TurnSpeed

float BBPGlue.API.BBPDrReflex.TurnSpeed
getset

Gets or sets Dr.

Reflex's turn speed.

◆ Velocity

Vector3 BBPGlue.API.BBPNpc.Velocity
getinherited

Gets the NPC navigator's current velocity.

◆ Wandering

bool BBPGlue.API.BBPNpc.Wandering
getinherited

Gets whether the NPC is currently wandering.

◆ WanderSpeed

float BBPGlue.API.BBPDrReflex.WanderSpeed
getset

Gets or sets Dr.

Reflex's wander speed.


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