![]() |
SpaceRTS - Starter Pack
1.3
|
Helper class to handle the existance of a Player owner for certain entity. Just is in charge of the dirty job ;) More...
Classes | |
| interface | Events |
| Events interface to handle all the player owner changes More... | |
Public Member Functions | |
| PlayerOwner (MonoBehaviour findAt, Events eventHandler) | |
| PlayerOwner constructor. Finds the Player through the findAt component. must have a Player sibling component or a PlayerControlled component. More... | |
| void | Init (MonoBehaviour findAt, Events eventHandler) |
| Finds the Player through the findAt component. must have a Player sibling component or a PlayerControlled component. More... | |
| void | Clear () |
| Clears Player, PlayerControlled and event handler references More... | |
Static Public Member Functions | |
| static bool | HasValidOwner (PlayerOwner owner) |
| Indicates if the PlayerOwner is valid and has a valid player owner. More... | |
Properties | |
| Player | Player [get] |
| The current Player owner. More... | |
Helper class to handle the existance of a Player owner for certain entity. Just is in charge of the dirty job ;)
| NullPointerGame.Extras.PlayerOwner.PlayerOwner | ( | MonoBehaviour | findAt, |
| Events | eventHandler | ||
| ) |
PlayerOwner constructor. Finds the Player through the findAt component. must have a Player sibling component or a PlayerControlled component.
| findAt | Starting point to find the Player component. |
| eventHandler | The object that will receive the owner changed events. |
| void NullPointerGame.Extras.PlayerOwner.Clear | ( | ) |
Clears Player, PlayerControlled and event handler references
|
static |
Indicates if the PlayerOwner is valid and has a valid player owner.
| owner | The PlayerOwner class to test. |
| void NullPointerGame.Extras.PlayerOwner.Init | ( | MonoBehaviour | findAt, |
| Events | eventHandler | ||
| ) |
Finds the Player through the findAt component. must have a Player sibling component or a PlayerControlled component.
| findAt | Starting point to find the Player component. |
| eventHandler | The object that will receive the owner changed events. |
|
get |
The current Player owner.