跳到主要内容
版本:0.1.0

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>?

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?

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?>?

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
  • OnLeftArea
  • OnLevelLoaded
  • OnLoadingScreenClose
  • OnLocalPlayerBeforeRebirth
  • OnMainCharacterEntityInitialized
  • OnMonsterDead
  • OnOtherPlayerInsideArea
  • OnOtherPlayerOutsideArea
  • OnPlayerChangedTeam
  • OnPlayerDead
  • OnPlayerPawnSpawned