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

Represents a pickup object in the world and provides access to its properties and interactions. More...

Public Member Functions

void AssignItem (BBPItemObject item)
 Assigns an item object to this pickup.
void AssignItem (object item)
 Assigns an item to this pickup using a raw object reference.
 BBPPickup (object? raw)
 Initializes a new instance of the BBPPickup class wrapping a raw object.
bool ClickableHidden ()
 Checks whether the pickup is hidden from being clickable.
bool ClickableRequiresNormalHeight ()
 Checks whether the pickup requires normal player height to be clickable.
void ClickableSighted (int player=0)
 Notifies that the pickup became sighted for clickable interaction by the given player.
void ClickableUnsighted (int player=0)
 Notifies that the pickup is no longer sighted for clickable interaction by the given player.
void Clicked (int player=0)
 Simulates a click on the pickup by the specified player index.
void Collect (int player=0)
 Collects the pickup on behalf of the specified player index.
void Hide (bool hidden)
 Hides or shows the pickup's GameObject.

Properties

bool Active [get, set]
 Gets or sets whether the pickup's GameObject is active in the scene.
bool Exists [get]
 Determines whether the underlying raw object exists.
bool Free [get, set]
 Gets or sets whether the pickup is free.
object? Icon [get, set]
 Gets or sets the icon object associated with the pickup.
object? IconPre [get, set]
 Gets or sets the pre-icon object associated with the pickup.
BBPItemObject Item [get, set]
 Gets or sets the item object contained in the pickup.
string Name [get, set]
 Gets or sets the name of the pickup's GameObject or underlying type name.
Vector3 Position [get]
 Gets the world position of the pickup.
int Price [get, set]
 Gets or sets the purchase price for the pickup.
object? Raw [get]
 The raw underlying object wrapped by this API class, or null if none.
bool Repeatable [get, set]
 Gets or sets whether the pickup is repeatable.
bool ShowDescription [get, set]
 Gets or sets whether the pickup shows a description when inspected.
BBPSoundObject Sound [get, set]
 Gets or sets the sound object associated with the pickup.
SpriteRenderer? SpriteRenderer [get]
 Gets the sprite renderer used to display the item's sprite.
bool StillHasItem [get, set]
 Gets or sets whether the pickup still contains an item.
bool SurvivePickup [get, set]
 Gets or sets whether the pickup survives after being picked up.

Detailed Description

Represents a pickup object in the world and provides access to its properties and interactions.

Constructor & Destructor Documentation

◆ BBPPickup()

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

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

Parameters
rawThe raw underlying object instance or null.

Member Function Documentation

◆ AssignItem() [1/2]

void BBPGlue.API.BBPPickup.AssignItem ( BBPItemObject item)

Assigns an item object to this pickup.

Parameters
itemThe item object to assign.

◆ AssignItem() [2/2]

void BBPGlue.API.BBPPickup.AssignItem ( object item)

Assigns an item to this pickup using a raw object reference.

Parameters
itemThe raw item object.

◆ ClickableHidden()

bool BBPGlue.API.BBPPickup.ClickableHidden ( )

Checks whether the pickup is hidden from being clickable.

Returns
True if clickable is hidden; otherwise false.

◆ ClickableRequiresNormalHeight()

bool BBPGlue.API.BBPPickup.ClickableRequiresNormalHeight ( )

Checks whether the pickup requires normal player height to be clickable.

Returns
True if normal height is required; otherwise false.

◆ ClickableSighted()

void BBPGlue.API.BBPPickup.ClickableSighted ( int player = 0)

Notifies that the pickup became sighted for clickable interaction by the given player.

Parameters
playerThe player index that sighted the pickup.

◆ ClickableUnsighted()

void BBPGlue.API.BBPPickup.ClickableUnsighted ( int player = 0)

Notifies that the pickup is no longer sighted for clickable interaction by the given player.

Parameters
playerThe player index that lost sight of the pickup.

◆ Clicked()

void BBPGlue.API.BBPPickup.Clicked ( int player = 0)

Simulates a click on the pickup by the specified player index.

Parameters
playerThe player index invoking the click.

◆ Collect()

void BBPGlue.API.BBPPickup.Collect ( int player = 0)

Collects the pickup on behalf of the specified player index.

Parameters
playerThe player index collecting the pickup.

◆ Hide()

void BBPGlue.API.BBPPickup.Hide ( bool hidden)

Hides or shows the pickup's GameObject.

Parameters
hiddenTrue to hide; false to show.

Property Documentation

◆ Active

bool BBPGlue.API.BBPPickup.Active
getset

Gets or sets whether the pickup's GameObject is active in the scene.

Returns
True if active; otherwise false.

◆ Exists

bool BBPGlue.API.BBPPickup.Exists
get

Determines whether the underlying raw object exists.

◆ Free

bool BBPGlue.API.BBPPickup.Free
getset

Gets or sets whether the pickup is free.

Returns
True if free; otherwise false.

◆ Icon

object? BBPGlue.API.BBPPickup.Icon
getset

Gets or sets the icon object associated with the pickup.

Returns
The icon object or null.

◆ IconPre

object? BBPGlue.API.BBPPickup.IconPre
getset

Gets or sets the pre-icon object associated with the pickup.

Returns
The pre-icon object or null.

◆ Item

BBPItemObject BBPGlue.API.BBPPickup.Item
getset

Gets or sets the item object contained in the pickup.

Returns
A BBPItemObject representing the item.

◆ Name

string BBPGlue.API.BBPPickup.Name
getset

Gets or sets the name of the pickup's GameObject or underlying type name.

Returns
The name as a string.

◆ Position

Vector3 BBPGlue.API.BBPPickup.Position
get

Gets the world position of the pickup.

Returns
The position as a Vector3.

◆ Price

int BBPGlue.API.BBPPickup.Price
getset

Gets or sets the purchase price for the pickup.

Returns
The price as an integer.

◆ Raw

object? BBPGlue.API.BBPPickup.Raw
get

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

◆ Repeatable

bool BBPGlue.API.BBPPickup.Repeatable
getset

Gets or sets whether the pickup is repeatable.

Returns
True if repeatable; otherwise false.

◆ ShowDescription

bool BBPGlue.API.BBPPickup.ShowDescription
getset

Gets or sets whether the pickup shows a description when inspected.

Returns
True if the description is shown; otherwise false.

◆ Sound

BBPSoundObject BBPGlue.API.BBPPickup.Sound
getset

Gets or sets the sound object associated with the pickup.

Returns
A BBPSoundObject instance.

◆ SpriteRenderer

SpriteRenderer? BBPGlue.API.BBPPickup.SpriteRenderer
get

Gets the sprite renderer used to display the item's sprite.

Returns
The SpriteRenderer or null.

◆ StillHasItem

bool BBPGlue.API.BBPPickup.StillHasItem
getset

Gets or sets whether the pickup still contains an item.

Returns
True if still has an item; otherwise false.

◆ SurvivePickup

bool BBPGlue.API.BBPPickup.SurvivePickup
getset

Gets or sets whether the pickup survives after being picked up.

Returns
True if it survives pickup; otherwise false.

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