Humanoid Control for Unity v4
|
A Counter can be used to record a integer number.
The Counter can be incremented and decremented and functions cal be called based on the value.
Inherits MonoBehaviour.
Public Member Functions | |
void | Decrement () |
Decrements the Counter value by 1. | |
void | Increment () |
Increments the Counter value by 1. | |
void | SetValueToMin () |
Sets the Counter value to the minimum value. | |
void | SetValueToMax () |
Sets the Counter value to the maximum value. | |
void | SetTimer (int seconds) |
void | SetTimer (int seconds, float speed) |
Public Attributes | |
int | min = 0 |
The minimum value for the Counter. | |
int | max = 10 |
The maximum value for the Counter. | |
float | timer = 0 |
bool | networking = false |
Synchronize the value across the network. | |
IntEventHandlers | counterEvent |
Can be used to call values based on the Counter value. | |
Protected Member Functions | |
virtual void | Awake () |
virtual void | FixedUpdate () |
virtual void | CheckBounds () |
void | CallRemote (string functionName, params object[] parameters) |
Protected Attributes | |
int | _value |
PhotonView | photonView |
Properties | |
int | value [get, set] |
Sets or gets the value of the Counter. | |
void Passer.Counter.Decrement | ( | ) |
Decrements the Counter value by 1.
If the Counter value is equal or lower than the minimum value, the value is not changed
void Passer.Counter.Increment | ( | ) |
Increments the Counter value by 1.
If the Counter value is equal or higher than the maximum value, the value is not changed If networking is enabled, the value is incremented on all clients and event handlers are called on all clients
IntEventHandlers Passer.Counter.counterEvent |
Can be used to call values based on the Counter value.
|
getset |
Sets or gets the value of the Counter.
If networking is enabled, the value is synchoronized across the network.