Wobbly Life Mod SDK
 
Loading...
Searching...
No Matches
ModWobblyLife.ModPlayerController Class Reference

The controller of a player. More...

Inheritance diagram for ModWobblyLife.ModPlayerController:
ModWobblyLife.Network.ModNetworkBehaviour

Public Member Functions

delegate void ModPlayerControllerNameChanged (ModPlayerController modPlayerController, string playerName)
 
delegate void ModPlayerControllerPlayerTransformChanged (ModPlayerController modPlayerController, Transform playerTransform)
 
delegate void ModPlayerControllerCharacterCallback (ModPlayerController modPlayerController, ModPlayerCharacter playerCharacter)
 
delegate void ModPlayerControllerGameplayCameraCallback (ModPlayerController modPlayerController, ModGameplayCamera gameplayCamera)
 
delegate void ModPlayerControllerCallback (ModPlayerController modPlayerController)
 
void AssignPlayerController (object playerControllerRaw)
 
void ServerSetSandboxUIEnabled (bool bEnabled)
 Set whether the Sandbox menu is enabled (Server only) Setting this to true will allow this player to be in Sandbox mode.
 
void ServerLoadSavedClothesOnActivePlayer (bool bForced=false)
 Load their saved clothes onto their current player character (Server only)
 
void ServerLoadSavedClothesOnActivePlayer (ModClothingSelectionType selectionType, bool bForced=false)
 Load their saved clothes onto their current player character (Server only)
 
void SetOwnerCameraFocus (ModCameraFocus cameraFocus, bool bAppendPrevious=true)
 Sets the current camera focus for this controller.
 
void SetOwnerCameraFocusPrevious ()
 Sets the camera focus to the previous one.
 
void SetOwnerCameraFocusPlayer ()
 Sets the camera focus to the player character.
 
ModCameraFocus GetCurrentCameraFocus ()
 Gets the current camera focus.
 
void ServerSetAllowedCustomClothingAbilities (bool bServerAllowedCustomsClothingAbilities)
 Set whether players are allowed to use special clothing abilities i.e Jet Pack etc (Server only)
 
object GetPlayerControllerRaw ()
 Returns the raw player controller.
 
ModPlayerCharacter GetPlayerCharacter ()
 Returns the player character.
 
bool HasPlayerLoaded ()
 Returns whether the player has loaded.
 
string GetPlayerName ()
 Returns the player name.
 
Transform GetPlayerTransform ()
 Returns the player transform.
 
ModPlayerControllerUI GetModPlayerControllerUI ()
 Returns the ui for this player.
 
ModPlayerControllerInputManager GetModPlayerControllerInputManager ()
 Returns the input manager for this player.
 
ModPlayerControllerSpectate GetModPlayerControllerSpectate ()
 Returns the spectate system for this player.
 
ModPlayerControllerInteractor GetControllerInteractor ()
 Returns the interactor for this player.
 
ModGameplayCamera GetModGameplayCamera ()
 Returns the gameplay camera for this player.
 
bool IsAllowedSavedClothes ()
 Returns whether this player is allowed to use their saved clothes or not.
 
virtual bool IsAllowedToSleep ()
 Returns whether this player is allowed to sleep.
 
bool IsAllowedToRespawn ()
 Returns whether this player is allowed to respawn.
 
void SetAllowedSavedClothes (bool bAllowedSavedClothes)
 Sets whether this player is allowed to use saved clothing.
 
void SetAllowedToRespawn (bool bAllowedToRespawn)
 Sets whether this player can respawn Setting this to false will remove the respawn option on their screen.
 
int GetLocalPlayerid ()
 Returns the local player id.
 
bool IsSplitscreenPlayer ()
 Returns whether this player is a split screen player.
 
bool IsLocal ()
 Return whether this player is local The same as doing networkObject.IsOwner()
 
- Public Member Functions inherited from ModWobblyLife.Network.ModNetworkBehaviour
delegate void ModNetworkBehaviourCallback (ModNetworkBehaviour modNetworkBehaviour)
 Delegate for a ModNetworkBehaviour.
 
delegate void ModNetworkBehaviourNetworkObjectCallback (ModNetworkObject modNetworkObject)
 Delegate for a ModNetworkObject.
 
delegate void ModNetworkBehaviourCallbackNetwork (ModNetworkBehaviour modNetworkBehaviour, Action< object > networkStartCallback, Action< object > registerRPCsCallback, Action< object > networkPostCallback)
 Internal use.
 
void AssignNetworkBehaviour (object networkBehaviour)
 
void ModPrepare (bool bIsPrefab)
 Internal use.
 
bool IsServer ()
 Returns whether you are the server.
 
bool IsConnected ()
 Returns whether you are connected.
 
Guid GetAssetId ()
 Returns the assetid.
 
string GetAssetIdRaw ()
 Returns the assetidraw.
 
void SetAssetId_Internal (string assetID)
 Sets the assetid.
 
object GetNetworkBehaviourRaw ()
 Returns the raw networkobject (Internal use)
 

Protected Member Functions

override void NetworkPost (object networkObject)
 
virtual void ModReady ()
 
bool ModCheck ()
 
override void OnValidate ()
 
override void Awake ()
 
override void OnAssignNetworkBehaviour (object networkBehaviour)
 
virtual void OnPlayerBasedUIAssigned ()
 Called when the ui system is ready (Owner only)
 
virtual void OnServerPersistentDataLoaded ()
 Called when the persistent data has been loaded i.e Clothes data (Server only)
 
virtual void OnPlayerNameChanged (string playerName)
 Called when the player name is changed.
 
virtual void OnPlayerTransformChanged (Transform playerTransform)
 Called when the player transform has changed.
 
virtual void OnPlayerCharacterSpawned (ModPlayerCharacter playerCharacter)
 Called when the player character has spawned.
 
virtual void OnPlayerCharacterDestroyed (ModPlayerCharacter playerCharacter)
 Called when the player character has been destroyed.
 
virtual void OnModGameplayCameraCreated (ModGameplayCamera modGameplayCamera)
 Called when the player camera has been created (Owners only)
 
virtual void OnPlayerHasLoaded ()
 Called when the player has loaded.
 
override void OnDestroy ()
 
- Protected Member Functions inherited from ModWobblyLife.Network.ModNetworkBehaviour
virtual void OnAssignNetworkBehaviour (object networkBehaviour)
 
virtual void Awake ()
 
virtual void Start ()
 
virtual void Reset ()
 
virtual void OnDestroy ()
 
virtual void OnValidate ()
 
virtual void ModAwake ()
 Called on Awake.
 
virtual void ModStart ()
 Called on Start.
 
virtual void ModReset ()
 Called on Reset.
 
virtual void ModOnValidate ()
 Called on validate.
 
virtual void ModOnDestroy ()
 Called on OnDestroy.
 
virtual void RegisterRPCs (object networkObject)
 
virtual void NetworkStart (object networkObject)
 
virtual void NetworkPost (object networkObject)
 
virtual void ModRegisterRPCs (ModNetworkObject modNetworkObject)
 Called when you should register rpcs.
 
virtual void ModNetworkStart (ModNetworkObject modNetworkObject)
 Called when this object is ready on the network.
 
virtual void ModNetworkPost (ModNetworkObject modNetworkObject)
 Called after fully initalized the network.
 

Protected Attributes

object playerControllerRaw
 
- Protected Attributes inherited from ModWobblyLife.Network.ModNetworkBehaviour
object networkBehaviour
 

Events

ModPlayerControllerNameChanged onPlayerNameChanged
 Called when the player name is changed.
 
ModPlayerControllerPlayerTransformChanged onPlayerTransformChanged
 Called when the player transform has changed.
 
ModPlayerControllerCharacterCallback onPlayerCharacterSpawned
 Called when the player character has spawned.
 
ModPlayerControllerCharacterCallback onPlayerCharacterDestroyed
 Called when the player character has been destroyed.
 
ModPlayerControllerGameplayCameraCallback onGameplayCameraCreated
 Called when the player camera has been created (Owners only)
 
ModPlayerControllerCallback onPlayerLoaded
 Called when the player has loaded.
 
ModPlayerControllerCallback onServerPersistentDataLoaded
 Called when the persistent data has been loaded i.e Clothes data (Server only)
 
ModPlayerControllerCallback onPlayerBasedUIAssigned
 Called when the ui system is ready (Owner only)
 
- Events inherited from ModWobblyLife.Network.ModNetworkBehaviour
static ModNetworkBehaviourCallbackNetwork onPrepare
 Internal use.
 
static ModNetworkBehaviourCallback onPreparePrefab
 Internal use.
 
ModNetworkBehaviourNetworkObjectCallback modNetworkStart
 
ModNetworkBehaviourNetworkObjectCallback modRegisterRPCs
 
ModNetworkBehaviourNetworkObjectCallback modNetworkPost
 
ModNetworkBehaviourCallback modOnDestroy
 

Additional Inherited Members

- Public Attributes inherited from ModWobblyLife.Network.ModNetworkBehaviour
ModNetworkObject modNetworkObject
 The networkObject used for communication of this object.
 

Detailed Description

The controller of a player.

Member Function Documentation

◆ AssignPlayerController()

void ModWobblyLife.ModPlayerController.AssignPlayerController ( object  playerControllerRaw)

◆ Awake()

override void ModWobblyLife.ModPlayerController.Awake ( )
protectedvirtual

◆ GetControllerInteractor()

ModPlayerControllerInteractor ModWobblyLife.ModPlayerController.GetControllerInteractor ( )

Returns the interactor for this player.

Returns

◆ GetCurrentCameraFocus()

ModCameraFocus ModWobblyLife.ModPlayerController.GetCurrentCameraFocus ( )

Gets the current camera focus.

Returns

◆ GetLocalPlayerid()

int ModWobblyLife.ModPlayerController.GetLocalPlayerid ( )

Returns the local player id.

Returns

◆ GetModGameplayCamera()

ModGameplayCamera ModWobblyLife.ModPlayerController.GetModGameplayCamera ( )

Returns the gameplay camera for this player.

Returns

◆ GetModPlayerControllerInputManager()

ModPlayerControllerInputManager ModWobblyLife.ModPlayerController.GetModPlayerControllerInputManager ( )

Returns the input manager for this player.

Returns

◆ GetModPlayerControllerSpectate()

ModPlayerControllerSpectate ModWobblyLife.ModPlayerController.GetModPlayerControllerSpectate ( )

Returns the spectate system for this player.

Returns

◆ GetModPlayerControllerUI()

ModPlayerControllerUI ModWobblyLife.ModPlayerController.GetModPlayerControllerUI ( )

Returns the ui for this player.

Returns

◆ GetPlayerCharacter()

ModPlayerCharacter ModWobblyLife.ModPlayerController.GetPlayerCharacter ( )

Returns the player character.

Returns

◆ GetPlayerControllerRaw()

object ModWobblyLife.ModPlayerController.GetPlayerControllerRaw ( )

Returns the raw player controller.

Returns

◆ GetPlayerName()

string ModWobblyLife.ModPlayerController.GetPlayerName ( )

Returns the player name.

Returns

◆ GetPlayerTransform()

Transform ModWobblyLife.ModPlayerController.GetPlayerTransform ( )

Returns the player transform.

Returns

◆ HasPlayerLoaded()

bool ModWobblyLife.ModPlayerController.HasPlayerLoaded ( )

Returns whether the player has loaded.

Returns

◆ IsAllowedSavedClothes()

bool ModWobblyLife.ModPlayerController.IsAllowedSavedClothes ( )

Returns whether this player is allowed to use their saved clothes or not.

Returns

◆ IsAllowedToRespawn()

bool ModWobblyLife.ModPlayerController.IsAllowedToRespawn ( )

Returns whether this player is allowed to respawn.

Returns

◆ IsAllowedToSleep()

virtual bool ModWobblyLife.ModPlayerController.IsAllowedToSleep ( )
virtual

Returns whether this player is allowed to sleep.

Returns

◆ IsLocal()

bool ModWobblyLife.ModPlayerController.IsLocal ( )

Return whether this player is local The same as doing networkObject.IsOwner()

Returns

◆ IsSplitscreenPlayer()

bool ModWobblyLife.ModPlayerController.IsSplitscreenPlayer ( )

Returns whether this player is a split screen player.

Returns

◆ ModCheck()

bool ModWobblyLife.ModPlayerController.ModCheck ( )
protected

◆ ModPlayerControllerCallback()

delegate void ModWobblyLife.ModPlayerController.ModPlayerControllerCallback ( ModPlayerController  modPlayerController)

◆ ModPlayerControllerCharacterCallback()

delegate void ModWobblyLife.ModPlayerController.ModPlayerControllerCharacterCallback ( ModPlayerController  modPlayerController,
ModPlayerCharacter  playerCharacter 
)

◆ ModPlayerControllerGameplayCameraCallback()

delegate void ModWobblyLife.ModPlayerController.ModPlayerControllerGameplayCameraCallback ( ModPlayerController  modPlayerController,
ModGameplayCamera  gameplayCamera 
)

◆ ModPlayerControllerNameChanged()

delegate void ModWobblyLife.ModPlayerController.ModPlayerControllerNameChanged ( ModPlayerController  modPlayerController,
string  playerName 
)

◆ ModPlayerControllerPlayerTransformChanged()

delegate void ModWobblyLife.ModPlayerController.ModPlayerControllerPlayerTransformChanged ( ModPlayerController  modPlayerController,
Transform  playerTransform 
)

◆ ModReady()

virtual void ModWobblyLife.ModPlayerController.ModReady ( )
protectedvirtual

◆ NetworkPost()

override void ModWobblyLife.ModPlayerController.NetworkPost ( object  networkObject)
protectedvirtual

◆ OnAssignNetworkBehaviour()

override void ModWobblyLife.ModPlayerController.OnAssignNetworkBehaviour ( object  networkBehaviour)
protectedvirtual

◆ OnDestroy()

override void ModWobblyLife.ModPlayerController.OnDestroy ( )
protectedvirtual

◆ OnModGameplayCameraCreated()

virtual void ModWobblyLife.ModPlayerController.OnModGameplayCameraCreated ( ModGameplayCamera  modGameplayCamera)
protectedvirtual

Called when the player camera has been created (Owners only)

Parameters
modGameplayCamera

◆ OnPlayerBasedUIAssigned()

virtual void ModWobblyLife.ModPlayerController.OnPlayerBasedUIAssigned ( )
protectedvirtual

Called when the ui system is ready (Owner only)

◆ OnPlayerCharacterDestroyed()

virtual void ModWobblyLife.ModPlayerController.OnPlayerCharacterDestroyed ( ModPlayerCharacter  playerCharacter)
protectedvirtual

Called when the player character has been destroyed.

Parameters
playerCharacter

◆ OnPlayerCharacterSpawned()

virtual void ModWobblyLife.ModPlayerController.OnPlayerCharacterSpawned ( ModPlayerCharacter  playerCharacter)
protectedvirtual

Called when the player character has spawned.

Parameters
playerCharacter

◆ OnPlayerHasLoaded()

virtual void ModWobblyLife.ModPlayerController.OnPlayerHasLoaded ( )
protectedvirtual

Called when the player has loaded.

◆ OnPlayerNameChanged()

virtual void ModWobblyLife.ModPlayerController.OnPlayerNameChanged ( string  playerName)
protectedvirtual

Called when the player name is changed.

Parameters
playerName

◆ OnPlayerTransformChanged()

virtual void ModWobblyLife.ModPlayerController.OnPlayerTransformChanged ( Transform  playerTransform)
protectedvirtual

Called when the player transform has changed.

Parameters
playerTransform

◆ OnServerPersistentDataLoaded()

virtual void ModWobblyLife.ModPlayerController.OnServerPersistentDataLoaded ( )
protectedvirtual

Called when the persistent data has been loaded i.e Clothes data (Server only)

◆ OnValidate()

override void ModWobblyLife.ModPlayerController.OnValidate ( )
protectedvirtual

◆ ServerLoadSavedClothesOnActivePlayer() [1/2]

void ModWobblyLife.ModPlayerController.ServerLoadSavedClothesOnActivePlayer ( bool  bForced = false)

Load their saved clothes onto their current player character (Server only)

Parameters
bForced

◆ ServerLoadSavedClothesOnActivePlayer() [2/2]

void ModWobblyLife.ModPlayerController.ServerLoadSavedClothesOnActivePlayer ( ModClothingSelectionType  selectionType,
bool  bForced = false 
)

Load their saved clothes onto their current player character (Server only)

Parameters
selectionType
bForced

◆ ServerSetAllowedCustomClothingAbilities()

void ModWobblyLife.ModPlayerController.ServerSetAllowedCustomClothingAbilities ( bool  bServerAllowedCustomsClothingAbilities)

Set whether players are allowed to use special clothing abilities i.e Jet Pack etc (Server only)

Parameters
bServerAllowedCustomsClothingAbilities

◆ ServerSetSandboxUIEnabled()

void ModWobblyLife.ModPlayerController.ServerSetSandboxUIEnabled ( bool  bEnabled)

Set whether the Sandbox menu is enabled (Server only) Setting this to true will allow this player to be in Sandbox mode.

Parameters
bEnabled

◆ SetAllowedSavedClothes()

void ModWobblyLife.ModPlayerController.SetAllowedSavedClothes ( bool  bAllowedSavedClothes)

Sets whether this player is allowed to use saved clothing.

Parameters
bAllowedSavedClothes

◆ SetAllowedToRespawn()

void ModWobblyLife.ModPlayerController.SetAllowedToRespawn ( bool  bAllowedToRespawn)

Sets whether this player can respawn Setting this to false will remove the respawn option on their screen.

Parameters
bAllowedToRespawn

◆ SetOwnerCameraFocus()

void ModWobblyLife.ModPlayerController.SetOwnerCameraFocus ( ModCameraFocus  cameraFocus,
bool  bAppendPrevious = true 
)

Sets the current camera focus for this controller.

Parameters
cameraFocusThe camera focus you are setting it to
bAppendPreviousWhether to set the previous camera to the current camera

◆ SetOwnerCameraFocusPlayer()

void ModWobblyLife.ModPlayerController.SetOwnerCameraFocusPlayer ( )

Sets the camera focus to the player character.

◆ SetOwnerCameraFocusPrevious()

void ModWobblyLife.ModPlayerController.SetOwnerCameraFocusPrevious ( )

Sets the camera focus to the previous one.

Member Data Documentation

◆ playerControllerRaw

object ModWobblyLife.ModPlayerController.playerControllerRaw
protected

Event Documentation

◆ onGameplayCameraCreated

ModPlayerControllerGameplayCameraCallback ModWobblyLife.ModPlayerController.onGameplayCameraCreated

Called when the player camera has been created (Owners only)

◆ onPlayerBasedUIAssigned

ModPlayerControllerCallback ModWobblyLife.ModPlayerController.onPlayerBasedUIAssigned

Called when the ui system is ready (Owner only)

◆ onPlayerCharacterDestroyed

ModPlayerControllerCharacterCallback ModWobblyLife.ModPlayerController.onPlayerCharacterDestroyed

Called when the player character has been destroyed.

◆ onPlayerCharacterSpawned

ModPlayerControllerCharacterCallback ModWobblyLife.ModPlayerController.onPlayerCharacterSpawned

Called when the player character has spawned.

◆ onPlayerLoaded

ModPlayerControllerCallback ModWobblyLife.ModPlayerController.onPlayerLoaded

Called when the player has loaded.

◆ onPlayerNameChanged

ModPlayerControllerNameChanged ModWobblyLife.ModPlayerController.onPlayerNameChanged

Called when the player name is changed.

◆ onPlayerTransformChanged

ModPlayerControllerPlayerTransformChanged ModWobblyLife.ModPlayerController.onPlayerTransformChanged

Called when the player transform has changed.

◆ onServerPersistentDataLoaded

ModPlayerControllerCallback ModWobblyLife.ModPlayerController.onServerPersistentDataLoaded

Called when the persistent data has been loaded i.e Clothes data (Server only)