DeathCamera
Jump To Parameters
Jump To Function Definitions
Parameter Definitions
Select the parameter name from below to jump directly to it on this page.
OnDisableSwitching
OnEnableSwitching
deathVisual
keyToSwitchNext
keyToSwitchPrevious
OnDisableSwitching
UnityEvent. Called when you disallow the owner player to switch camera targets.
| Exposed Value | Type | Default Value |
|---|---|---|
| public | UnityEvent | new UnityEvent() |
OnEnableSwitching
UnityEvent. Called when you allow the owner player to switch camera targets.
| Exposed Value | Type | Default Value |
|---|---|---|
| public | UnityEvent | new UnityEvent() |
deathVisual
(Optional)The UI GameObject to enable when you die.
| Exposed Value | Type | Default Value |
|---|---|---|
| protected | GameObject | null |
keyToSwitchNext
The key to press in order to have the camera switch to a new player “
target if "allowSwitching" is true.
| Exposed Value | Type | Default Value |
|---|---|---|
| protected | string | ”” |
keyToSwitchPrevious
The key to press in order to have the camera switch to a new player “
target if "allowSwitching" is true.
| Exposed Value | Type | Default Value |
|---|---|---|
| protected | string | ”” |
Function Definitions
Select the function name from below to jump directly to it on this page.
Awake
EnableSwitching
SelectNextTarget
SelectPreviousTarget
SwitchCameraTarget
Update
protected virtual void Awake()
Makes sure the death visual is inactive by default.
| Expose Value | Overrideable | Returns |
|---|---|---|
| protected | True | Does not return anything |
No parameters
public virtual void EnableSwitching(bool isEnabled)
Allow the owner player to switch the camera target.
| Expose Value | Overrideable | Returns |
|---|---|---|
| public | True | Does not return anything |
| Parameter Name | Description |
|---|---|
| isEnabled | bool type, allow camera switching? |
public virtual void SelectNextTarget()
Sets the potential next target the camera can switch to. Does not switch the camera target.
| Expose Value | Overrideable | Returns |
|---|---|---|
| public | True | Does not return anything |
No parameters
public virtual void SelectPreviousTarget()
Sets the potential next target the camera can switch to. Does not switch the camera target.
| Expose Value | Overrideable | Returns |
|---|---|---|
| public | True | Does not return anything |
No parameters
public virtual bool SwitchCameraTarget(Transform target)
Changes the invector camera target to target another player in the room.
| Expose Value | Overrideable | Returns |
|---|---|---|
| public | True | true |
| Parameter Name | Description |
|---|---|
| target | Transform type, the transform that you want the camera to target |
protected virtual void Update()
If switching is allowed, this will capture the owner input and switch the camera to target another player when the owner presses the
keyToSwitchPreviousorkeyToSwitchNextparameter value.
| Expose Value | Overrideable | Returns |
|---|---|---|
| protected | True | Does not return anything |
No parameters