Humanoid Control for Unity v4
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
Passer.MenuManager Class Reference

Description

The Menu Manager uses two Interaction Pointers for each hand:

The Menu Manager uses a Trigger Sphere Collider to detect if the user has moved too far the the menu to interact with it.

Inherits MonoBehaviour.

Public Member Functions

void SetMenuActive (bool active)
 Activates or deactivates the menu and updates the interaction pointer behaviour.
 

Public Attributes

HumanoidControl humanoid
 
float menuDistance = 0.5F
 
InteractionPointer leftMenuPointer
 
InteractionPointer rightMenuPointer
 
InteractionPointer leftTeleporter
 
InteractionPointer rightTeleporter
 

Protected Member Functions

virtual void Awake ()
 Initialization.
 
HumanoidControl FindHumanoid ()
 Tries to find the local Humanoid.
 
void InitInteractionPointers (HumanoidControl humanoid)
 Detects the Teleporter and Menu Interaction pointer on the humanoid.
 
InteractionPointer GetInteractionPointer (HandTarget handTarget, InteractionPointer invalidPointer=null)
 Find interaction pointer on the hand.
 
void SetControllerInput (HumanoidControl humanoid)
 
void OnTriggerExit (Collider other)
 Trigger handler for when an object moves out of the sphere collider.
 
void ShowMenu ()
 Show the menu at 'distance' from the players' head. But take core it is not placed inside objects. If this happens, the menu is places closer to the humanoid.
 
void HideMenu ()
 Hide the menu.
 
bool MenuActive ()
 Is the menu currently visible?
 
void EnableMenuPointer (ControllerInput controllerInput)
 Enable the Menu Pointer. This will also set the controller input.
 
void DisableMenuPointer (ControllerInput controllerInput)
 Disable the Menu Pointer. This will also disable the controller input.
 
void EnableTeleporter (ControllerInput controllerInput)
 Enable the teleporter. This will also set the controller input.
 
void DisableTeleporter (ControllerInput controllerInput)
 Disable the Teleporter. This will also disable the controller input.
 
void AdjustOutOfRangeDistance ()
 Adjust trigger sphere collider radius for out-of-range.
 

Member Function Documentation

◆ FindHumanoid()

HumanoidControl Passer.MenuManager.FindHumanoid ( )
protected

Tries to find the local Humanoid.

Returns
The found humanoid, null if no local humanoid has been found

◆ InitInteractionPointers()

void Passer.MenuManager.InitInteractionPointers ( HumanoidControl  humanoid)
protected

Detects the Teleporter and Menu Interaction pointer on the humanoid.

Parameters
humanoidThe humanoid for which the interaction pointers need to be found

◆ GetInteractionPointer()

InteractionPointer Passer.MenuManager.GetInteractionPointer ( HandTarget  handTarget,
InteractionPointer  invalidPointer = null 
)
protected

Find interaction pointer on the hand.

Parameters
handTargetThe hand to which the Interaction Pointer should be attached
invalidPointer(optional) when give, the interaction pointer should be not euqual to the invalidPointer
Returns
The found interaction pointer

◆ SetMenuActive()

void Passer.MenuManager.SetMenuActive ( bool  active)

Activates or deactivates the menu and updates the interaction pointer behaviour.

Parameters
activeIndication whether the menu has to be active

◆ MenuActive()

bool Passer.MenuManager.MenuActive ( )
protected

Is the menu currently visible?

Returns
boolean indicating whether the menu is visible

◆ EnableMenuPointer()

void Passer.MenuManager.EnableMenuPointer ( ControllerInput  controllerInput)
protected

Enable the Menu Pointer. This will also set the controller input.

Parameters
controllerInputThe ControllerInput to update

◆ DisableMenuPointer()

void Passer.MenuManager.DisableMenuPointer ( ControllerInput  controllerInput)
protected

Disable the Menu Pointer. This will also disable the controller input.

Parameters
controllerInputThe ControllerInput to update

◆ EnableTeleporter()

void Passer.MenuManager.EnableTeleporter ( ControllerInput  controllerInput)
protected

Enable the teleporter. This will also set the controller input.

Parameters
controllerInputThe ControllerInput to update

◆ DisableTeleporter()

void Passer.MenuManager.DisableTeleporter ( ControllerInput  controllerInput)
protected

Disable the Teleporter. This will also disable the controller input.

Parameters
controllerInputThe ControllerInput to update

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