Wobbly Life Mod SDK
 
Loading...
Searching...
No Matches
ModWobblyLife.ModBaseGamemode Class Referenceabstract

A gamemode (Server only), which defines all the rules but is not networked. More...

Inheritance diagram for ModWobblyLife.ModBaseGamemode:
ModWobblyLife.ModGamemode ModWobblyLife.ModFreemodeGamemode

Public Member Functions

delegate void StaticModGamemodeAssigned (ModBaseGamemode gamemode, ModBaseGamemodeCallbacks callbacks)
 Internal use.
 
void AssignGamemode (object gamemodeRaw)
 Internal use.
 
void SpawnPlayerCharacter (ModPlayerController playerController, Action< ModPlayerCharacter > onSpawned, bool bOwnerFocus=true)
 Spawns a player character for a player controller.
 
void SpawnPlayerCharacter (ModPlayerController playerController, Action< ModPlayerCharacter > onSpawned, ModPlayerCharacterSpawnPoint spawnPoint, bool bOwnerFocus=true)
 Spawns a player character for a player controller.
 
void RespawnPlayerCharacter (ModPlayerController playerController, int respawnOption=-1)
 Respawns a player character for a player controller.
 
void RespawnPlayerCharacter (ModPlayerController playerController, ModPlayerCharacterSpawnPoint spawnPoint, bool bOwnerFocus=true)
 Respawns a player character for a player controller.
 
void DestroyPlayerCharacter (ModPlayerController playerController, bool bInvokeKillEvent=false, bool bVanish=false)
 Destroys a player character for a player controller.
 
virtual ModPlayerCharacterSpawnPoint GetPlayerSpawnPoint (ModPlayerController playerController)
 Returns the player spawn point for a player controller.
 
virtual bool IsRespawningAllowed ()
 Whether respawning is allowed.
 
abstract ModPlayerController GetModPlayerControllerPrefab ()
 Gets the player controller prefab.
 
abstract ModPlayerCharacter GetModPlayerCharacterPrefab ()
 Gets the player character prefab.
 

Protected Member Functions

bool CheckReady ()
 
virtual void ModAwake ()
 Called on Awake.
 
virtual void ModStart ()
 Called on Start.
 
virtual void OnEnable ()
 Called on OnEnable.
 
virtual void OnDisable ()
 Called on OnDisable.
 
virtual void Update ()
 Called on Update.
 
virtual void FixedUpdate ()
 Called on FixedUpdate.
 
virtual void LateUpdate ()
 Called on LateUpdate.
 
virtual void OnModDestroy ()
 Called on OnDestroy.
 
virtual void OnSpawnedPlayerController (ModPlayerController playerController)
 Called when a player controller spawned.
 
virtual void OnDestroyedPlayerController (ModPlayerController playerController)
 Called when a player controller destroyed.
 
virtual void OnSpawnedPlayerCharacter (ModPlayerController playerController, ModPlayerCharacter playerCharacter)
 Called when a player character spawned.
 
virtual void OnServerPlayerDied (ModPlayerController playerController, ModPlayerCharacter playerCharacter)
 Called when a player died i.e via Kill event.
 
virtual void OnServerPlayerConnected (ModConnection modConnection)
 Called when a player is connected.
 
virtual void OnServerPlayerDisconnected (ModConnection modConnection)
 Called when a player is disconnected.
 

Protected Attributes

object gamemodeRaw
 

Events

static StaticModGamemodeAssigned onPrepare
 Internal use.
 

Detailed Description

A gamemode (Server only), which defines all the rules but is not networked.

Member Function Documentation

◆ AssignGamemode()

void ModWobblyLife.ModBaseGamemode.AssignGamemode ( object  gamemodeRaw)

Internal use.

Parameters
gamemodeRaw

◆ CheckReady()

bool ModWobblyLife.ModBaseGamemode.CheckReady ( )
protected

◆ DestroyPlayerCharacter()

void ModWobblyLife.ModBaseGamemode.DestroyPlayerCharacter ( ModPlayerController  playerController,
bool  bInvokeKillEvent = false,
bool  bVanish = false 
)

Destroys a player character for a player controller.

Parameters
playerControllerThe PlayerController you want to destroy their character
bInvokeKillEventWhether you want to invoke the kill event
bVanishWhether you want the character to vanish or not

◆ FixedUpdate()

virtual void ModWobblyLife.ModBaseGamemode.FixedUpdate ( )
protectedvirtual

Called on FixedUpdate.

◆ GetModPlayerCharacterPrefab()

abstract ModPlayerCharacter ModWobblyLife.ModBaseGamemode.GetModPlayerCharacterPrefab ( )
pure virtual

Gets the player character prefab.

Returns

Implemented in ModWobblyLife.ModGamemode.

◆ GetModPlayerControllerPrefab()

abstract ModPlayerController ModWobblyLife.ModBaseGamemode.GetModPlayerControllerPrefab ( )
pure virtual

Gets the player controller prefab.

Returns

Implemented in ModWobblyLife.ModGamemode.

◆ GetPlayerSpawnPoint()

virtual ModPlayerCharacterSpawnPoint ModWobblyLife.ModBaseGamemode.GetPlayerSpawnPoint ( ModPlayerController  playerController)
virtual

Returns the player spawn point for a player controller.

Parameters
playerController
Returns

Reimplemented in ModWobblyLife.ModFreemodeGamemode.

◆ IsRespawningAllowed()

virtual bool ModWobblyLife.ModBaseGamemode.IsRespawningAllowed ( )
virtual

Whether respawning is allowed.

Returns

Reimplemented in ModWobblyLife.ModFreemodeGamemode.

◆ LateUpdate()

virtual void ModWobblyLife.ModBaseGamemode.LateUpdate ( )
protectedvirtual

Called on LateUpdate.

◆ ModAwake()

virtual void ModWobblyLife.ModBaseGamemode.ModAwake ( )
protectedvirtual

Called on Awake.

◆ ModStart()

virtual void ModWobblyLife.ModBaseGamemode.ModStart ( )
protectedvirtual

Called on Start.

◆ OnDestroyedPlayerController()

virtual void ModWobblyLife.ModBaseGamemode.OnDestroyedPlayerController ( ModPlayerController  playerController)
protectedvirtual

Called when a player controller destroyed.

Parameters
playerController

◆ OnDisable()

virtual void ModWobblyLife.ModBaseGamemode.OnDisable ( )
protectedvirtual

Called on OnDisable.

◆ OnEnable()

virtual void ModWobblyLife.ModBaseGamemode.OnEnable ( )
protectedvirtual

Called on OnEnable.

◆ OnModDestroy()

virtual void ModWobblyLife.ModBaseGamemode.OnModDestroy ( )
protectedvirtual

Called on OnDestroy.

◆ OnServerPlayerConnected()

virtual void ModWobblyLife.ModBaseGamemode.OnServerPlayerConnected ( ModConnection  modConnection)
protectedvirtual

Called when a player is connected.

Parameters
modConnection

◆ OnServerPlayerDied()

virtual void ModWobblyLife.ModBaseGamemode.OnServerPlayerDied ( ModPlayerController  playerController,
ModPlayerCharacter  playerCharacter 
)
protectedvirtual

Called when a player died i.e via Kill event.

Parameters
playerController
playerCharacter

Reimplemented in ModWobblyLife.ModFreemodeGamemode.

◆ OnServerPlayerDisconnected()

virtual void ModWobblyLife.ModBaseGamemode.OnServerPlayerDisconnected ( ModConnection  modConnection)
protectedvirtual

Called when a player is disconnected.

Parameters
modConnection

◆ OnSpawnedPlayerCharacter()

virtual void ModWobblyLife.ModBaseGamemode.OnSpawnedPlayerCharacter ( ModPlayerController  playerController,
ModPlayerCharacter  playerCharacter 
)
protectedvirtual

Called when a player character spawned.

Parameters
playerController
playerCharacter

◆ OnSpawnedPlayerController()

virtual void ModWobblyLife.ModBaseGamemode.OnSpawnedPlayerController ( ModPlayerController  playerController)
protectedvirtual

Called when a player controller spawned.

Parameters
playerController

Reimplemented in ModWobblyLife.ModFreemodeGamemode.

◆ RespawnPlayerCharacter() [1/2]

void ModWobblyLife.ModBaseGamemode.RespawnPlayerCharacter ( ModPlayerController  playerController,
int  respawnOption = -1 
)

Respawns a player character for a player controller.

Parameters
playerController
respawnOption

◆ RespawnPlayerCharacter() [2/2]

void ModWobblyLife.ModBaseGamemode.RespawnPlayerCharacter ( ModPlayerController  playerController,
ModPlayerCharacterSpawnPoint  spawnPoint,
bool  bOwnerFocus = true 
)

Respawns a player character for a player controller.

Parameters
playerController
spawnPoint
bOwnerFocus

◆ SpawnPlayerCharacter() [1/2]

void ModWobblyLife.ModBaseGamemode.SpawnPlayerCharacter ( ModPlayerController  playerController,
Action< ModPlayerCharacter onSpawned,
bool  bOwnerFocus = true 
)

Spawns a player character for a player controller.

Parameters
playerController
onSpawned
bOwnerFocus

◆ SpawnPlayerCharacter() [2/2]

void ModWobblyLife.ModBaseGamemode.SpawnPlayerCharacter ( ModPlayerController  playerController,
Action< ModPlayerCharacter onSpawned,
ModPlayerCharacterSpawnPoint  spawnPoint,
bool  bOwnerFocus = true 
)

Spawns a player character for a player controller.

Parameters
playerController
onSpawned
spawnPoint
bOwnerFocus

◆ StaticModGamemodeAssigned()

delegate void ModWobblyLife.ModBaseGamemode.StaticModGamemodeAssigned ( ModBaseGamemode  gamemode,
ModBaseGamemodeCallbacks  callbacks 
)

Internal use.

Parameters
gamemode
callbacks

◆ Update()

virtual void ModWobblyLife.ModBaseGamemode.Update ( )
protectedvirtual

Called on Update.

Member Data Documentation

◆ gamemodeRaw

object ModWobblyLife.ModBaseGamemode.gamemodeRaw
protected

Event Documentation

◆ onPrepare

StaticModGamemodeAssigned ModWobblyLife.ModBaseGamemode.onPrepare
static

Internal use.