Adventure Creator  1.79.1
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2022
AC.Button Class Reference

Public Member Functions

 Button ()
 
 Button (Button button)
 
bool IsButtonModified ()
 Checks if any of the Button's values have been modified from their defaults. More...
 
void CopyButton (Button _button)
 Copies the values of another Button onto itself. More...
 
string GetFullLabel (Hotspot _hotspot, InvInstance invInstance, int _language)
 
override string ToString ()
 

Public Attributes

Interaction interaction = null
 
ActionListAsset assetFile = null
 
GameObject customScriptObject = null
 
string customScriptFunction = ""
 
bool isDisabled = false
 
int invID = 0
 
int iconID = -1
 
SelectItemMode selectItemMode = SelectItemMode.Use
 
PlayerAction playerAction = PlayerAction.DoNothing
 
bool doubleClickDoesNotSnapPlayerToMarker = false
 
bool setProximity = false
 
float proximity = 1f
 
bool faceAfter = false
 
bool isBlocking = false
 
int parameterID = -1
 
int invParameterID = -1
 

Detailed Description

A data container for Hotspot interactions.

Constructor & Destructor Documentation

◆ Button() [1/2]

AC.Button.Button ( )

The default Constructor.

◆ Button() [2/2]

AC.Button.Button ( Button  button)

A Constructor that copies its values from another Button

Member Function Documentation

◆ CopyButton()

void AC.Button.CopyButton ( Button  _button)

Copies the values of another Button onto itself.

Parameters
_buttonThe Button to copies values from

◆ IsButtonModified()

bool AC.Button.IsButtonModified ( )

Checks if any of the Button's values have been modified from their defaults.

Returns
True if any of the Button's values have been modified from their defaults.

Member Data Documentation

◆ assetFile

ActionListAsset AC.Button.assetFile = null

The ActionListAsset to run, if the Hotspots's interactionSource = InteractionSource.AssetFile

◆ customScriptFunction

string AC.Button.customScriptFunction = ""

The name of the function to run, if the Hotspot's interactionSource = InteractionSource.CustomScript

◆ customScriptObject

GameObject AC.Button.customScriptObject = null

The GameObject with the custom script to run, if the Hotspot's interactionSource = InteractionSource.CustomScript

◆ doubleClickDoesNotSnapPlayerToMarker

bool AC.Button.doubleClickDoesNotSnapPlayerToMarker = false

If True, and playerAction = PlayerAction.WalkToMarker, and the Hotspot's doubleClickingHotspot = DoubleClickingHotspot.TriggersInteractionInstantly, then the Player will snap to the Hotspot's Walk-to Marker when the Interaction is run through double-clicking

◆ faceAfter

bool AC.Button.faceAfter = false

If True, then the Player will face the Hotspot after reaching the Marker

◆ iconID

int AC.Button.iconID = -1

The ID number of the CursorIcon this interaction is associated with, if this is a "Use" interaction

◆ interaction

Interaction AC.Button.interaction = null

The Interaction ActionList to run, if the Hotspot's interactionSource = InteractionSource.InScene

◆ invID

int AC.Button.invID = 0

The ID number of the inventory item (InvItem) this interaction is associated with, if this is an "Inventory" interaction

◆ invParameterID

int AC.Button.invParameterID = -1

If >=0, The ID number of the InventoryItem ActionParameter in assetFile / interaction to set to the InvItem that was active when the Button was triggered

◆ isBlocking

bool AC.Button.isBlocking = false

If True, and playerAction = PlayerAction.WalkTo / WalkToMarker, then gameplay will be blocked while the Player moves

◆ isDisabled

bool AC.Button.isDisabled = false

If True, then the interaction is disabled and cannot be displayed or triggered

◆ parameterID

int AC.Button.parameterID = -1

If >=0, The ID number of the GameObject ActionParameter in assetFile / interaction to set to the Hotspot that the Button is a part of

◆ playerAction

PlayerAction AC.Button.playerAction = PlayerAction.DoNothing

What the Player prefab does after clicking the Hotspot, but before the Interaction itself is run (DoNothing, TurnToFace, WalkTo, WalkToMarker)

◆ proximity

float AC.Button.proximity = 1f

The proximity the Player must be within, if setProximity = True

◆ selectItemMode

SelectItemMode AC.Button.selectItemMode = SelectItemMode.Use

What kind of inventory interaction mode this responds to (Use, Give)

◆ setProximity

bool AC.Button.setProximity = false

If True, and playerAction = PlayerAction.WalkTo, then the Interaction will be run once the Player is within a certain distance of the Hotspot