Humanoid Control for Unity v4
|
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) |
override void Passer.Humanoid.HumanoidButton.OnPointerClick | ( | PointerEventData | eventData | ) |
This function is called when the button is clicked.
eventData | Event payload associated with the humanoid |
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 ///
eventData | Event payload associated with the humanoid |
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