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

Description

Unity UI button with information on which humanoid pressed the button.

Unity provides an great UI system which includes a Button component which can call functions on objects when it is pressed. A limitation is that you cannot determine who has pressed the button which can be useful in multiplayer environments. For this case we provide the Humanoid Button. When a Humanoid Button is pressed, a function can be called which takes a HumanoidControl parameter representing the humanoid who pressed the button. This parameter can be used to make the functionality dependent on who pressed the button.

Inherits Button.

Classes

class  HumanoidEvent
 The Event taking a HumanoidControl parameter. More...
 

Public Member Functions

override void OnPointerClick (PointerEventData eventData)
 This function is called when the button is clicked.
 
override void OnSubmit (BaseEventData eventData)
 This function is called when the button is activated with the default button.
 

Public Attributes

new HumanoidEvent onClick = new HumanoidEvent()
 The onClick event which replaces the standard onClick event.
 

Protected Member Functions

void Press (BaseEventData eventData)
 

Member Function Documentation

◆ OnPointerClick()

override void Passer.Humanoid.HumanoidButton.OnPointerClick ( PointerEventData  eventData)

This function is called when the button is clicked.

Parameters
eventDataEvent payload associated with the humanoid

◆ OnSubmit()

override void Passer.Humanoid.HumanoidButton.OnSubmit ( BaseEventData  eventData)

This function is called when the button is activated with the default button.

This is not supported by Humanoid Control, but added for completeness ///

Parameters
eventDataEvent payload associated with the humanoid

Member Data Documentation

◆ onClick

new HumanoidEvent Passer.Humanoid.HumanoidButton.onClick = new HumanoidEvent()

The onClick event which replaces the standard onClick event.

This version takes an HumanoidControl parameter The standard does not take a parameter


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