Table of Contents

Class SwitchAction

Namespace
FishMMO.Shared
Assembly
FishMMO.Shared.dll

ECA action that activates or deactivates an ISwitchTarget linked by the interacted ISwitch, then broadcasts the new state to the player. Toggle switches flip state each interaction; non-toggle switches only activate once (the CanInteract(IPlayerCharacter) guard prevents re-interaction on non-toggle switches that are already activated). Server-only.

[Serializable]
public class SwitchAction : BaseAction, IAction
Inheritance
SwitchAction
Implements
Inherited Members

Methods

Execute(ICharacter, EventData)

Toggles or activates the switch target and notifies the client of the new state.

public override void Execute(ICharacter initiator, EventData eventData)

Parameters

initiator ICharacter
eventData EventData