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

Public Member Functions

void UpdateCursor ()
 
void SetSelectedCursorID (int _cursorID)
 Sets the active cursor ID, provided that the interaction method is CustomScript. More...
 
void DrawCursor ()
 
Texture GetCurrentCursorTexture ()
 Gets the current cursor texture. More...
 
int GetSelectedCursor ()
 Gets the index number of the currently-selected cursor within CursorManager's cursorIcons List. More...
 
int GetSelectedCursorID ()
 Gets the ID number of the currently-selected cursor, within CursorManager's cursorIcons List. More...
 
void ResetSelectedCursor ()
 Resets the currently-selected cursor
 
void SetCursorFromID (int ID)
 Sets the cursor to an icon defined in CursorManager. More...
 
void SetCursor (CursorIcon _icon)
 Sets the cursor to an icon defined in CursorManager. More...
 

Properties

bool ForceOffCursor [set]
 
bool ContextCycleExamine [get]
 

Detailed Description

This script displays the cursor on screen. The available cursors are defined in CursorManager. It should be placed on the GameEngine prefab.

Member Function Documentation

◆ DrawCursor()

void AC.PlayerCursor.DrawCursor ( )

Draws the cursor. This is called from StateHandler's OnGUI() function.

◆ GetCurrentCursorTexture()

Texture AC.PlayerCursor.GetCurrentCursorTexture ( )

Gets the current cursor texture.

Returns
The current cursor texture. If the cursor is hidden or showing no texture, the last-assigned texture will be returned instead.

◆ GetSelectedCursor()

int AC.PlayerCursor.GetSelectedCursor ( )

Gets the index number of the currently-selected cursor within CursorManager's cursorIcons List.

Returns
If = -2, the inventory cursor is showing. If = -1, the main pointer is showing. If > 0, the index number of the currently-selected cursor within CursorManager's cursorIcons List

◆ GetSelectedCursorID()

int AC.PlayerCursor.GetSelectedCursorID ( )

Gets the ID number of the currently-selected cursor, within CursorManager's cursorIcons List.

Returns
The ID number of the currently-selected cursor, within CursorManager's cursorIcons List

◆ SetCursor()

void AC.PlayerCursor.SetCursor ( CursorIcon  _icon)

Sets the cursor to an icon defined in CursorManager.

Parameters
_iconThe cursor, within CursorManager's cursorIcons List, to select

◆ SetCursorFromID()

void AC.PlayerCursor.SetCursorFromID ( int  ID)

Sets the cursor to an icon defined in CursorManager.

Parameters
IDThe ID number of the cursor, within CursorManager's cursorIcons List, to select

◆ SetSelectedCursorID()

void AC.PlayerCursor.SetSelectedCursorID ( int  _cursorID)

Sets the active cursor ID, provided that the interaction method is CustomScript.

Parameters
_cursorIDThe ID number of the cursor defined in the Cursor Manager. If set to -1, the current cursor will be deselected main cursor will be displayed.

◆ UpdateCursor()

void AC.PlayerCursor.UpdateCursor ( )

Updates the cursor. This is called every frame by StateHandler.

Property Documentation

◆ ForceOffCursor

bool AC.PlayerCursor.ForceOffCursor
set

If True, the cursor will always be hidden.