Skip to main content
Version: 0.2.1

Interface IWukongEventApi

Namespace: WukongMp.Sdk.Api
Assembly: WukongMp.Sdk.dll

Provides events related to gameplay, player actions, and multiplayer interactions in Wukong Multiplayer.

public interface IWukongEventApi

OnBeginPlayGameplayLevel​

Fired when the player enters a gameplay level.

event Action? OnBeginPlayGameplayLevel

Event Type​

Action?

OnConnected​

Fired when any player connects to the server.

event Action<PlayerId>? OnConnected

Event Type​

Action<PlayerId>?

OnDisconnected​

Fired when any player disconnects from the server, either voluntarily or involuntarily.

event Action<PlayerId, DisconnectReason>? OnDisconnected

Event Type​

Action<PlayerId, DisconnectReason>?

OnEndPlayGameplayLevel​

Fired when the player leaves a gameplay level, either by exiting to the main menu or by loading another level.

event Action? OnEndPlayGameplayLevel

Event Type​

Action?

OnExitLevel​

Fired when the player exits a level, either by exiting to the main menu or by loading another level.

event Action? OnExitLevel

Event Type​

Action?

OnJoinedArea​

Fired when the player enters an area.

event Action<AreaId>? OnJoinedArea

Event Type​

Action<AreaId>?

OnLanguageChanged​

Fired when the game's language is changed, either by the player changing it in the settings or by the game automatically setting it based on the player's system language.

event Action<CultureInfo>? OnLanguageChanged

Event Type​

Action<CultureInfo>?

OnLeftArea​

Fired when the player leaves an area.

event Action<AreaId>? OnLeftArea

Event Type​

Action<AreaId>?

OnLevelLoaded​

Fired when a gameplay level is loaded, but before the loading screen is closed. This is a good event to use for initializing custom widgets, so that they are ready to be shown as soon as the loading screen is closed.

event Action? OnLevelLoaded

Event Type​

Action?

OnLoadingScreenClose​

Fired when the loading screen is closed after loading a gameplay level.

event Action? OnLoadingScreenClose

Event Type​

Action?

OnLocalPlayerBeforeRebirth​

Fired when the local player's character is about to rebirth. This is fired before the rebirth actually happens, so the player's character will still be dead at this point.

event Action? OnLocalPlayerBeforeRebirth

Event Type​

Action?

OnLocalPlayerChangedSpectator​

Fired when the local player changes spectator mode, either by entering or exiting spectator mode.

event Action<bool>? OnLocalPlayerChangedSpectator

Event Type​

Action<bool>?

OnMainCharacterEntityInitialized​

Fired when the player's main character ECS entity is initialized and ready. This is fired before OnPlayerPawnSpawned, so it can be used to set up things that need to be ready before the pawn is spawned.

event Action<ReadyMainCharacter>? OnMainCharacterEntityInitialized

Event Type​

Action<ReadyMainCharacter>?

OnMonsterDead​

Fired when any monster dies. The first parameter is the monster that died, and the second parameter is the entity that killed it (if applicable).

event Action<ReadyTamer, ReadyCharacter?>? OnMonsterDead

Event Type​

Action<ReadyTamer, ReadyCharacter?>?

OnMonsterDestroyed​

Fired when a monster is removed from the game world, either by dying or by being despawned for other reasons (e.g. the player leaving the area).

event Action<ReadyTamer>? OnMonsterDestroyed

Event Type​

Action<ReadyTamer>?

OnMonsterSpawned​

Fired when a monster is spawned in the game world, either by being spawned by the player or by being spawned by the game itself.

event Action<ReadyTamer>? OnMonsterSpawned

Event Type​

Action<ReadyTamer>?

OnOtherPlayerInsideArea​

Fired when another player enters the same area as the local player.

event Action<PlayerId, AreaId>? OnOtherPlayerInsideArea

Event Type​

Action<PlayerId, AreaId>?

OnOtherPlayerOutsideArea​

Fired when another player leaves the area that the local player is in.

event Action<PlayerId, AreaId>? OnOtherPlayerOutsideArea

Event Type​

Action<PlayerId, AreaId>?

OnPlayerChangedTeam​

Fired when the player changes team, either by rebirthing or by joining a game in progress.

event Action<ReadyMainCharacter>? OnPlayerChangedTeam

Event Type​

Action<ReadyMainCharacter>?

OnPlayerDead​

Fired when any player dies. The first parameter is the player character that died, and the second parameter is the entity that killed them (if applicable).

event Action<ReadyMainCharacter, ReadyCharacter?>? OnPlayerDead

Event Type​

Action<ReadyMainCharacter, ReadyCharacter?>?

OnPlayerPawnSpawned​

Fired when the player's pawn (the in-game character they control) is spawned. This can happen when you enter a new area, or when another player connects to the game and their pawn is spawned for you.

event Action<ReadyMainCharacter>? OnPlayerPawnSpawned

Event Type​

Action<ReadyMainCharacter>?

  • OnBeginPlayGameplayLevel
  • OnConnected
  • OnDisconnected
  • OnEndPlayGameplayLevel
  • OnExitLevel
  • OnJoinedArea
  • OnLanguageChanged
  • OnLeftArea
  • OnLevelLoaded
  • OnLoadingScreenClose
  • OnLocalPlayerBeforeRebirth
  • OnLocalPlayerChangedSpectator
  • OnMainCharacterEntityInitialized
  • OnMonsterDead
  • OnMonsterDestroyed
  • OnMonsterSpawned
  • OnOtherPlayerInsideArea
  • OnOtherPlayerOutsideArea
  • OnPlayerChangedTeam
  • OnPlayerDead
  • OnPlayerPawnSpawned