Chunks
Moddable voxel sandbox for room-scale VR.
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Properties | List of all members
Chunks.Interface.WandTool Class Reference

Base class for types that define selectable wand controller functionality. More...

Public Member Functions

bool Activate ()
 Switches the wand's currently active tool to this one. More...
 

Static Public Member Functions

static IEnumerable< Type > GetAllTypes ()
 Gets all types loaded from plugins that extend WandTool. More...
 
static Type GetType (string fullName)
 Attempts to find a wand tool type with the given full type name. If one does not exist null is returned. More...
 

Public Attributes

virtual Color Color => Color.White
 Color tint to apply to the wand while this tool is active. More...
 

Protected Member Functions

void GetRegionBounds (IntVector a, IntVector b, out IntVector min, out IntVector max)
 Helper method to find the smallest axis aligned bounding box that contains two positions. More...
 
virtual void OnInitialize ()
 Called when the wand tool is first attached to a wand. More...
 
virtual void OnStartInteractingWithHoldable (Holdable holdable)
 
virtual void OnStopInteractingWithHoldable ()
 
virtual void OnStartInteractingWithMenu (MenuPanel panel)
 
virtual void OnStopInteractingWithMenu ()
 
virtual void OnSoftDisable ()
 
virtual void OnSoftEnable ()
 
MenuPanel ShowMenuPanel< TControl > (bool hideWhenDeactivated)
 
MenuPanel ShowMenuPanel (ResourceName controlName, bool hideWhenDeactivated)
 
virtual void OnActivate ()
 Called each time this tool is switched to. More...
 
virtual void OnDeactivate ()
 Called each time a wand tool is switched to while this one is active. More...
 
virtual void OnUpdate ()
 Called once every world update while this tool is active. More...
 
object StartCoroutine (IEnumerator routine)
 Starts execution of a coroutine. More...
 
object Wait (float timeSeconds)
 Suspends coroutine operation for the given time when yielded. More...
 

Properties

bool IsActive [get]
 If true, this wand tool is currently selected. More...
 
virtual Graphics.Texture Icon [get]
 
IWorld World [get]
 The currently loaded world. More...
 
Wand Wand [get]
 The wand associated with this tool. More...
 
virtual bool CanDeactivate [get]
 If false, attempts to switch to another wand tool while this one is active will silently fail. More...
 

Detailed Description

Base class for types that define selectable wand controller functionality.

Member Function Documentation

bool Chunks.Interface.WandTool.Activate ( )

Switches the wand's currently active tool to this one.

Returns
static IEnumerable<Type> Chunks.Interface.WandTool.GetAllTypes ( )
static

Gets all types loaded from plugins that extend WandTool.

Returns
void Chunks.Interface.WandTool.GetRegionBounds ( IntVector  a,
IntVector  b,
out IntVector  min,
out IntVector  max 
)
protected

Helper method to find the smallest axis aligned bounding box that contains two positions.

Parameters
aFirst position
bSecond position
minMinimum bounds of the bounding box containing both positions
maxMaximum bounds of hte bounding box containing both positions
static Type Chunks.Interface.WandTool.GetType ( string  fullName)
static

Attempts to find a wand tool type with the given full type name. If one does not exist null is returned.

Parameters
fullNameFull name of the wand tool type to find
virtual void Chunks.Interface.WandTool.OnActivate ( )
protectedvirtual

Called each time this tool is switched to.

virtual void Chunks.Interface.WandTool.OnDeactivate ( )
protectedvirtual

Called each time a wand tool is switched to while this one is active.

virtual void Chunks.Interface.WandTool.OnInitialize ( )
protectedvirtual

Called when the wand tool is first attached to a wand.

virtual void Chunks.Interface.WandTool.OnSoftDisable ( )
protectedvirtual
virtual void Chunks.Interface.WandTool.OnSoftEnable ( )
protectedvirtual
virtual void Chunks.Interface.WandTool.OnStartInteractingWithHoldable ( Holdable  holdable)
protectedvirtual
virtual void Chunks.Interface.WandTool.OnStartInteractingWithMenu ( MenuPanel  panel)
protectedvirtual
virtual void Chunks.Interface.WandTool.OnStopInteractingWithHoldable ( )
protectedvirtual
virtual void Chunks.Interface.WandTool.OnStopInteractingWithMenu ( )
protectedvirtual
virtual void Chunks.Interface.WandTool.OnUpdate ( )
protectedvirtual

Called once every world update while this tool is active.

MenuPanel Chunks.Interface.WandTool.ShowMenuPanel ( ResourceName  controlName,
bool  hideWhenDeactivated 
)
protected
MenuPanel Chunks.Interface.WandTool.ShowMenuPanel< TControl > ( bool  hideWhenDeactivated)
protected
Type Constraints
TControl :Control 
TControl :new() 
object Chunks.Interface.WandTool.StartCoroutine ( IEnumerator  routine)
protected

Starts execution of a coroutine.

Parameters
routineEnumerator returned by a coroutine method
object Chunks.Interface.WandTool.Wait ( float  timeSeconds)
protected

Suspends coroutine operation for the given time when yielded.

Parameters
timeSecondsTime to suspend operation for in seconds

Member Data Documentation

virtual Color Chunks.Interface.WandTool.Color => Color.White

Color tint to apply to the wand while this tool is active.

Property Documentation

virtual bool Chunks.Interface.WandTool.CanDeactivate
get

If false, attempts to switch to another wand tool while this one is active will silently fail.

virtual Graphics.Texture Chunks.Interface.WandTool.Icon
get
bool Chunks.Interface.WandTool.IsActive
get

If true, this wand tool is currently selected.

Wand Chunks.Interface.WandTool.Wand
get

The wand associated with this tool.

IWorld Chunks.Interface.WandTool.World
getprotected

The currently loaded world.


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