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

Represents a random event in the environment and exposes its properties and lifecycle methods. More...

Public Member Functions

void AfterUpdateSetup (object rng)
 Performs setup after an update cycle using the provided RNG.
void AssignRoom (BBPRoom room)
 Assigns the specified room to this event.
 BBPRandomEvent (object? raw)
 Initializes a new instance of the BBPRandomEvent class wrapping a raw object.
void Begin ()
 Begins the random event by invoking the underlying Begin method.
void End ()
 Ends the random event by invoking the underlying End method.
void Initialize (object environmentController, object rng)
 Initializes the random event with the given environment controller and RNG.
void Pause ()
 Pauses the random event.
void PremadeSetup ()
 Performs premade setup for the event by invoking PremadeSetup.
void ResetConditions ()
 Resets the event's conditions.
void SetEventTime (object rng)
 Sets the event time using the provided RNG by invoking the underlying SetEventTime method.
void Unpause ()
 Unpauses the random event.

Properties

bool Active [get]
 Gets whether the random event is currently active.
float DescriptionTime [get, set]
 Gets or sets the duration of the event description.
object? EnvironmentController [get, set]
 Gets or sets the environment controller associated with this event.
BBPSoundObject EventIntro [get]
 Gets the sound object played at the start of the event.
BBPSoundObject EventJingleOverride [get]
 Gets the optional jingle override sound for the event.
float EventTime [get]
 Gets the configured event time.
bool Exists [get]
 Determines whether the underlying raw object exists.
float MaxEventTime [get, set]
 Gets or sets the maximum event time for scheduling.
float MinEventTime [get, set]
 Gets or sets the minimum event time for scheduling.
string Name [get]
 Gets a name for the random event derived from the underlying object.
object? PotentialRoomAssets [get]
 Gets potential room assets associated with the event.
object? Raw [get]
 The raw underlying object wrapped by this API class, or null if none.
float RemainingTime [get, set]
 Gets or sets the remaining time for the event.
BBPRoom Room [get]
 Gets the room associated with this event.
string Type [get]
 Gets the type identifier of the random event.

Detailed Description

Represents a random event in the environment and exposes its properties and lifecycle methods.

Constructor & Destructor Documentation

◆ BBPRandomEvent()

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

Initializes a new instance of the BBPRandomEvent class wrapping a raw object.

Parameters
rawThe raw underlying object instance or null.

Member Function Documentation

◆ AfterUpdateSetup()

void BBPGlue.API.BBPRandomEvent.AfterUpdateSetup ( object rng)

Performs setup after an update cycle using the provided RNG.

Parameters
rngRandom number generator object used for setup.

◆ AssignRoom()

void BBPGlue.API.BBPRandomEvent.AssignRoom ( BBPRoom room)

Assigns the specified room to this event.

Parameters
roomThe room to assign.

◆ Begin()

void BBPGlue.API.BBPRandomEvent.Begin ( )

Begins the random event by invoking the underlying Begin method.

◆ End()

void BBPGlue.API.BBPRandomEvent.End ( )

Ends the random event by invoking the underlying End method.

◆ Initialize()

void BBPGlue.API.BBPRandomEvent.Initialize ( object environmentController,
object rng )

Initializes the random event with the given environment controller and RNG.

Parameters
environmentControllerThe environment controller to associate with the event.
rngA random number generator object used for setup.

◆ Pause()

void BBPGlue.API.BBPRandomEvent.Pause ( )

Pauses the random event.

◆ PremadeSetup()

void BBPGlue.API.BBPRandomEvent.PremadeSetup ( )

Performs premade setup for the event by invoking PremadeSetup.

◆ ResetConditions()

void BBPGlue.API.BBPRandomEvent.ResetConditions ( )

Resets the event's conditions.

◆ SetEventTime()

void BBPGlue.API.BBPRandomEvent.SetEventTime ( object rng)

Sets the event time using the provided RNG by invoking the underlying SetEventTime method.

Parameters
rngA random number generator used to set the event time.

◆ Unpause()

void BBPGlue.API.BBPRandomEvent.Unpause ( )

Unpauses the random event.

Property Documentation

◆ Active

bool BBPGlue.API.BBPRandomEvent.Active
get

Gets whether the random event is currently active.

Returns
True if active; otherwise false.

◆ DescriptionTime

float BBPGlue.API.BBPRandomEvent.DescriptionTime
getset

Gets or sets the duration of the event description.

Returns
The description time as a float.

◆ EnvironmentController

object? BBPGlue.API.BBPRandomEvent.EnvironmentController
getset

Gets or sets the environment controller associated with this event.

Returns
The environment controller object or null.

◆ EventIntro

BBPSoundObject BBPGlue.API.BBPRandomEvent.EventIntro
get

Gets the sound object played at the start of the event.

Returns
A BBPSoundObject instance.

◆ EventJingleOverride

BBPSoundObject BBPGlue.API.BBPRandomEvent.EventJingleOverride
get

Gets the optional jingle override sound for the event.

Returns
A BBPSoundObject instance or an empty wrapper.

◆ EventTime

float BBPGlue.API.BBPRandomEvent.EventTime
get

Gets the configured event time.

Returns
The event time as a float.

◆ Exists

bool BBPGlue.API.BBPRandomEvent.Exists
get

Determines whether the underlying raw object exists.

◆ MaxEventTime

float BBPGlue.API.BBPRandomEvent.MaxEventTime
getset

Gets or sets the maximum event time for scheduling.

Returns
The maximum event time as a float.

◆ MinEventTime

float BBPGlue.API.BBPRandomEvent.MinEventTime
getset

Gets or sets the minimum event time for scheduling.

Returns
The minimum event time as a float.

◆ Name

string BBPGlue.API.BBPRandomEvent.Name
get

Gets a name for the random event derived from the underlying object.

Returns
The name of the event as a string.

◆ PotentialRoomAssets

object? BBPGlue.API.BBPRandomEvent.PotentialRoomAssets
get

Gets potential room assets associated with the event.

Returns
An object representing potential room assets or null.

◆ Raw

object? BBPGlue.API.BBPRandomEvent.Raw
get

The raw underlying object wrapped by this API class, or null if none.

◆ RemainingTime

float BBPGlue.API.BBPRandomEvent.RemainingTime
getset

Gets or sets the remaining time for the event.

Returns
The remaining time as a float.

◆ Room

BBPRoom BBPGlue.API.BBPRandomEvent.Room
get

Gets the room associated with this event.

Returns
A BBPRoom instance representing the event's room.

◆ Type

string BBPGlue.API.BBPRandomEvent.Type
get

Gets the type identifier of the random event.

Returns
The event type as a string.

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