Adventure Creator  1.66.1
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2018
AC.DetectHotspots Class Reference
Inheritance diagram for AC.DetectHotspots:

Public Member Functions

void AfterLoad ()
 
Hotspot [] GetAllDetectedHotspots ()
 Gets all Hotspots found within the object's Trigger collider. More...
 
Hotspot GetSelected ()
 Gets the currently-active Hotspot. More...
 
void ForceRemoveHotspot (Hotspot _hotspot)
 Removes a Hotspot from the script's internal record of detected Hotspots. More...
 
void _Update ()
 
bool IsHotspotInTrigger (Hotspot hotspot)
 Checks if a specific Hotspot is within its volume. More...
 
void HighlightAll ()
 

Properties

Hotspot NearestHotspot [get]
 

Detailed Description

Used to only allow Hotspots within a given volume to be selectable. Attach this as a child object to your Player prefab, and assign it as your Hotspot detector child - be sure to set "hotspot detection" to Player Vicinity in SettingsManager.

Member Function Documentation

◆ _Update()

void AC.DetectHotspots._Update ( )

Detects Hotspots in its vicinity. This is public so that it can be called by StateHandler every frame.

◆ AfterLoad()

void AC.DetectHotspots.AfterLoad ( )

Called after a scene change.

◆ ForceRemoveHotspot()

void AC.DetectHotspots.ForceRemoveHotspot ( Hotspot  _hotspot)

Removes a Hotspot from the script's internal record of detected Hotspots.

Parameters
_hotspotThe Hotspot to forget

◆ GetAllDetectedHotspots()

Hotspot [] AC.DetectHotspots.GetAllDetectedHotspots ( )

Gets all Hotspots found within the object's Trigger collider.

Returns
All Hotspots found within the object's Trigger collider.

◆ GetSelected()

Hotspot AC.DetectHotspots.GetSelected ( )

Gets the currently-active Hotspot.

Returns
The currently active Hotspot.

◆ HighlightAll()

void AC.DetectHotspots.HighlightAll ( )

Highlights all Hotspots within its volume.

◆ IsHotspotInTrigger()

bool AC.DetectHotspots.IsHotspotInTrigger ( Hotspot  hotspot)

Checks if a specific Hotspot is within its volume.

Parameters
hotspotThe Hotspot to check for
Returns
True if the Hotspot is within the Collider volume

Property Documentation

◆ NearestHotspot

Hotspot AC.DetectHotspots.NearestHotspot
get

The Hotspot nearest to the centre of the detector