Show / Hide Table of Contents

Class Cursor

Represents the cursor in the inventory pane. The player uses the arrow keys to move the cursor around to select an InventoryElement

Inheritance
object
Object
Component
Behaviour
MonoBehaviour
Cursor
DefaultCursor
Namespace: WeaverCore.Inventory
Assembly: WeaverCore.dll
Syntax
public abstract class Cursor : MonoBehaviour

Properties

| Edit this page View Source

CursorPosition

The current position of the cursor

Declaration
public abstract Vector3 CursorPosition { get; }
Property Value
Type Description
Vector3
| Edit this page View Source

DefaultCursorPrefab

The default cursor prefab to use

Declaration
public static Cursor DefaultCursorPrefab { get; }
Property Value
Type Description
Cursor
| Edit this page View Source

HighlightedElement

The element the cursor is currently highlighting

Declaration
public InventoryElement HighlightedElement { get; }
Property Value
Type Description
InventoryElement
| Edit this page View Source

Panel

The pane this Cursor is a part of

Declaration
public InventoryPanel Panel { get; }
Property Value
Type Description
InventoryPanel

Methods

| Edit this page View Source

Begin(InventoryPanel, InventoryElement)

Starts up the cursor

Declaration
public void Begin(InventoryPanel panel, InventoryElement beginElement)
Parameters
Type Name Description
InventoryPanel panel

The pane this cursor is a part of

InventoryElement beginElement

The element the cursor should start on

| Edit this page View Source

CanMove()

Can the cursor be moved to a new element?

Declaration
public virtual bool CanMove()
Returns
Type Description
bool
| Edit this page View Source

End()

Ends the cursor

Declaration
public void End()
| Edit this page View Source

Hide()

Makes the cursor invisible

Declaration
public void Hide()
| Edit this page View Source

MoveTo(InventoryElement)

Moves the cursor to a new element

Declaration
public void MoveTo(InventoryElement element)
Parameters
Type Name Description
InventoryElement element

The new element the cursor should highlight

| Edit this page View Source

OnBegin(InventoryElement)

Called when the inventory pane is opened

Declaration
protected abstract void OnBegin(InventoryElement beginElement)
Parameters
Type Name Description
InventoryElement beginElement

The element the cursor should start on

| Edit this page View Source

OnEnd()

Called when the inventory pane is closed

Declaration
protected abstract void OnEnd()
| Edit this page View Source

OnHide()

Called when the cursor is to become invisible

Declaration
protected abstract void OnHide()
| Edit this page View Source

OnMoveTo(InventoryElement)

Called when the cursor is to move to a new InventoryElement

Declaration
protected abstract void OnMoveTo(InventoryElement element)
Parameters
Type Name Description
InventoryElement element

The new inventory element to move to

| Edit this page View Source

OnShow()

Called when the cursor is to become visible

Declaration
protected abstract void OnShow()
| Edit this page View Source

Show()

Makes the cursor visible

Declaration
public void Show()

Extension Methods

ReflectionUtilities.ReflectCallMethod(object, string, object[], BindingFlags)
ReflectionUtilities.ReflectGetField(object, string, BindingFlags)
ReflectionUtilities.ReflectGetMethod(object, string, BindingFlags)
ReflectionUtilities.ReflectGetProperty(object, string, BindingFlags)
ReflectionUtilities.ReflectSetField(object, string, object, BindingFlags)
ReflectionUtilities.ReflectSetProperty(object, string, object, BindingFlags)
CoroutineUtilities.RunCoroutineWhile<T>(T, IEnumerator, Func<bool>)
  • Edit this page
  • View Source
☀
☾
In this article
Back to top
Generated by DocFX
☀
☾