Skip to main content

Class EventBus

Namespace: DiceRolling.Events
Assembly: dice-rolling.dll

[Tool]
[ScriptPath("res://features/Common/Events/EventBus.cs")]
public class EventBus : Node, IDisposable

Inheritance

object ← GodotObject ← Node ← EventBus

Implements

IDisposable

Inherited Members

Show/Hide Inherited Members

Node.NotificationEnterTree,
Node.NotificationExitTree,
Node.NotificationMovedInParent,
Node.NotificationReady,
Node.NotificationPaused,
Node.NotificationUnpaused,
Node.NotificationPhysicsProcess,
Node.NotificationProcess,
Node.NotificationParented,
Node.NotificationUnparented,
Node.NotificationSceneInstantiated,
Node.NotificationDragBegin,
Node.NotificationDragEnd,
Node.NotificationPathRenamed,
Node.NotificationChildOrderChanged,
Node.NotificationInternalProcess,
Node.NotificationInternalPhysicsProcess,
Node.NotificationPostEnterTree,
Node.NotificationDisabled,
Node.NotificationEnabled,
Node.NotificationResetPhysicsInterpolation,
Node.NotificationEditorPreSave,
Node.NotificationEditorPostSave,
Node.NotificationWMMouseEnter,
Node.NotificationWMMouseExit,
Node.NotificationWMWindowFocusIn,
Node.NotificationWMWindowFocusOut,
Node.NotificationWMCloseRequest,
Node.NotificationWMGoBackRequest,
Node.NotificationWMSizeChanged,
Node.NotificationWMDpiChange,
Node.NotificationVpMouseEnter,
Node.NotificationVpMouseExit,
Node.NotificationOsMemoryWarning,
Node.NotificationTranslationChanged,
Node.NotificationWMAbout,
Node.NotificationCrash,
Node.NotificationOsImeUpdate,
Node.NotificationApplicationResumed,
Node.NotificationApplicationPaused,
Node.NotificationApplicationFocusIn,
Node.NotificationApplicationFocusOut,
Node.NotificationTextServerChanged,
Node.GetNode<T>(NodePath),
Node.GetNodeOrNull<T>(NodePath),
Node.GetChild<T>(int, bool),
Node.GetChildOrNull<T>(int, bool),
Node.GetOwner<T>(),
Node.GetOwnerOrNull<T>(),
Node.GetParent<T>(),
Node.GetParentOrNull<T>(),
Node._EnterTree(),
Node._ExitTree(),
Node._GetConfigurationWarnings(),
Node._Input(InputEvent),
Node._PhysicsProcess(double),
Node._Process(double),
Node._Ready(),
Node._ShortcutInput(InputEvent),
Node._UnhandledInput(InputEvent),
Node._UnhandledKeyInput(InputEvent),
Node.PrintOrphanNodes(),
Node.AddSibling(Node, bool),
Node.AddChild(Node, bool, Node.InternalMode),
Node.RemoveChild(Node),
Node.Reparent(Node, bool),
Node.GetChildCount(bool),
Node.GetChildren(bool),
Node.GetChild(int, bool),
Node.HasNode(NodePath),
Node.GetNode(NodePath),
Node.GetNodeOrNull(NodePath),
Node.GetParent(),
Node.FindChild(string, bool, bool),
Node.FindChildren(string, string, bool, bool),
Node.FindParent(string),
Node.HasNodeAndResource(NodePath),
Node.GetNodeAndResource(NodePath),
Node.IsInsideTree(),
Node.IsPartOfEditedScene(),
Node.IsAncestorOf(Node),
Node.IsGreaterThan(Node),
Node.GetPath(),
Node.GetPathTo(Node, bool),
Node.AddToGroup(StringName, bool),
Node.RemoveFromGroup(StringName),
Node.IsInGroup(StringName),
Node.MoveChild(Node, int),
Node.GetGroups(),
Node.GetIndex(bool),
Node.PrintTree(),
Node.PrintTreePretty(),
Node.GetTreeString(),
Node.GetTreeStringPretty(),
Node.PropagateNotification(int),
Node.PropagateCall(StringName, Array, bool),
Node.SetPhysicsProcess(bool),
Node.GetPhysicsProcessDeltaTime(),
Node.IsPhysicsProcessing(),
Node.GetProcessDeltaTime(),
Node.SetProcess(bool),
Node.IsProcessing(),
Node.SetProcessInput(bool),
Node.IsProcessingInput(),
Node.SetProcessShortcutInput(bool),
Node.IsProcessingShortcutInput(),
Node.SetProcessUnhandledInput(bool),
Node.IsProcessingUnhandledInput(),
Node.SetProcessUnhandledKeyInput(bool),
Node.IsProcessingUnhandledKeyInput(),
Node.CanProcess(),
Node.SetDisplayFolded(bool),
Node.IsDisplayedFolded(),
Node.SetProcessInternal(bool),
Node.IsProcessingInternal(),
Node.SetPhysicsProcessInternal(bool),
Node.IsPhysicsProcessingInternal(),
Node.IsPhysicsInterpolated(),
Node.IsPhysicsInterpolatedAndEnabled(),
Node.ResetPhysicsInterpolation(),
Node.SetTranslationDomainInherited(),
Node.GetWindow(),
Node.GetLastExclusiveWindow(),
Node.GetTree(),
Node.CreateTween(),
Node.Duplicate(int),
Node.ReplaceBy(Node, bool),
Node.SetSceneInstanceLoadPlaceholder(bool),
Node.GetSceneInstanceLoadPlaceholder(),
Node.SetEditableInstance(Node, bool),
Node.IsEditableInstance(Node),
Node.GetViewport(),
Node.QueueFree(),
Node.RequestReady(),
Node.IsNodeReady(),
Node.SetMultiplayerAuthority(int, bool),
Node.GetMultiplayerAuthority(),
Node.IsMultiplayerAuthority(),
Node.RpcConfig(StringName, Variant),
Node.GetRpcConfig(),
Node.Atr(string, StringName),
Node.AtrN(string, StringName, int, StringName),
Node.Rpc(StringName, params Variant[]),
Node.Rpc(StringName, ReadOnlySpan<Variant>),
Node.RpcId(long, StringName, params Variant[]),
Node.RpcId(long, StringName, ReadOnlySpan<Variant>),
Node.UpdateConfigurationWarnings(),
Node.CallDeferredThreadGroup(StringName, params Variant[]),
Node.CallDeferredThreadGroup(StringName, ReadOnlySpan<Variant>),
Node.SetDeferredThreadGroup(StringName, Variant),
Node.NotifyDeferredThreadGroup(int),
Node.CallThreadSafe(StringName, params Variant[]),
Node.CallThreadSafe(StringName, ReadOnlySpan<Variant>),
Node.SetThreadSafe(StringName, Variant),
Node.NotifyThreadSafe(int),
Node.EmitSignalReady(),
Node.EmitSignalRenamed(),
Node.EmitSignalTreeEntered(),
Node.EmitSignalTreeExiting(),
Node.EmitSignalTreeExited(),
Node.EmitSignalChildEnteredTree(Node),
Node.EmitSignalChildExitingTree(Node),
Node.EmitSignalChildOrderChanged(),
Node.EmitSignalReplacingBy(Node),
Node.EmitSignalEditorDescriptionChanged(Node),
Node.EmitSignalEditorStateChanged(),
Node.InvokeGodotClassMethod(in godot_string_name, NativeVariantPtrArgs, out godot_variant),
Node.HasGodotClassMethod(in godot_string_name),
Node.HasGodotClassSignal(in godot_string_name),
Node.Name,
Node.UniqueNameInOwner,
Node.SceneFilePath,
Node.Owner,
Node.Multiplayer,
Node.ProcessMode,
Node.ProcessPriority,
Node.ProcessPhysicsPriority,
Node.ProcessThreadGroup,
Node.ProcessThreadGroupOrder,
Node.ProcessThreadMessages,
Node.PhysicsInterpolationMode,
Node.AutoTranslateMode,
Node.EditorDescription,
Node.Ready,
Node.Renamed,
Node.TreeEntered,
Node.TreeExiting,
Node.TreeExited,
Node.ChildEnteredTree,
Node.ChildExitingTree,
Node.ChildOrderChanged,
Node.ReplacingBy,
Node.EditorDescriptionChanged,
Node.EditorStateChanged,
GodotObject.NotificationPostinitialize,
GodotObject.NotificationPredelete,
GodotObject.NotificationExtensionReloaded,
GodotObject.InstanceFromId(ulong),
GodotObject.IsInstanceIdValid(ulong),
GodotObject.IsInstanceValid(GodotObject?),
GodotObject.WeakRef(GodotObject?),
GodotObject.Dispose(),
GodotObject.Dispose(bool),
GodotObject.ToString(),
GodotObject.ToSignal(GodotObject, StringName),
GodotObject._Get(StringName),
GodotObject._GetPropertyList(),
GodotObject._IterGet(Variant),
GodotObject._IterInit(Array),
GodotObject._IterNext(Array),
GodotObject._Notification(int),
GodotObject._PropertyCanRevert(StringName),
GodotObject._PropertyGetRevert(StringName),
GodotObject._Set(StringName, Variant),
GodotObject._ValidateProperty(Dictionary),
GodotObject.Free(),
GodotObject.GetClass(),
GodotObject.IsClass(string),
GodotObject.Set(StringName, Variant),
GodotObject.Get(StringName),
GodotObject.SetIndexed(NodePath, Variant),
GodotObject.GetIndexed(NodePath),
GodotObject.GetPropertyList(),
GodotObject.GetMethodList(),
GodotObject.PropertyCanRevert(StringName),
GodotObject.PropertyGetRevert(StringName),
GodotObject.Notification(int, bool),
GodotObject.GetInstanceId(),
GodotObject.SetScript(Variant),
GodotObject.GetScript(),
GodotObject.SetMeta(StringName, Variant),
GodotObject.RemoveMeta(StringName),
GodotObject.GetMeta(StringName, Variant),
GodotObject.HasMeta(StringName),
GodotObject.GetMetaList(),
GodotObject.AddUserSignal(string, Array),
GodotObject.HasUserSignal(StringName),
GodotObject.RemoveUserSignal(StringName),
GodotObject.EmitSignal(StringName, params Variant[]),
GodotObject.EmitSignal(StringName, ReadOnlySpan<Variant>),
GodotObject.Call(StringName, params Variant[]),
GodotObject.Call(StringName, ReadOnlySpan<Variant>),
GodotObject.CallDeferred(StringName, params Variant[]),
GodotObject.CallDeferred(StringName, ReadOnlySpan<Variant>),
GodotObject.SetDeferred(StringName, Variant),
GodotObject.Callv(StringName, Array),
GodotObject.HasMethod(StringName),
GodotObject.GetMethodArgumentCount(StringName),
GodotObject.HasSignal(StringName),
GodotObject.GetSignalList(),
GodotObject.GetSignalConnectionList(StringName),
GodotObject.GetIncomingConnections(),
GodotObject.Connect(StringName, Callable, uint),
GodotObject.Disconnect(StringName, Callable),
GodotObject.IsConnected(StringName, Callable),
GodotObject.HasConnections(StringName),
GodotObject.SetBlockSignals(bool),
GodotObject.IsBlockingSignals(),
GodotObject.NotifyPropertyListChanged(),
GodotObject.SetMessageTranslation(bool),
GodotObject.CanTranslateMessages(),
GodotObject.Tr(StringName, StringName),
GodotObject.TrN(StringName, StringName, int, StringName),
GodotObject.GetTranslationDomain(),
GodotObject.SetTranslationDomain(StringName),
GodotObject.IsQueuedForDeletion(),
GodotObject.CancelFree(),
GodotObject.EmitSignalScriptChanged(),
GodotObject.EmitSignalPropertyListChanged(),
GodotObject.InvokeGodotClassMethod(in godot_string_name, NativeVariantPtrArgs, out godot_variant),
GodotObject.HasGodotClassMethod(in godot_string_name),
GodotObject.HasGodotClassSignal(in godot_string_name),
GodotObject.NativeInstance,
GodotObject.ScriptChanged,
GodotObject.PropertyListChanged,
object.Equals(object?),
object.Equals(object?, object?),
object.GetHashCode(),
object.GetType(),
object.MemberwiseClone(),
object.ReferenceEquals(object?, object?),
object.ToString()

Properties

Instance

public static EventBus Instance { get; }

Property Value

EventBus

Methods

EmitAttributeChanged(CharacterType, AttributeType)

public void EmitAttributeChanged(CharacterType character, AttributeType attributeType)

Parameters

character CharacterType

attributeType AttributeType

EmitSignalActionSelected(TargetBoardType)

protected void EmitSignalActionSelected(TargetBoardType targetBoard)

Parameters

targetBoard TargetBoardType

EmitSignalAttributeChanged()

protected void EmitSignalAttributeChanged()

EmitSignalCharacterSelected(CharacterComponent)

protected void EmitSignalCharacterSelected(CharacterComponent character)

Parameters

character CharacterComponent

EmitSignalCharacterUnselected()

protected void EmitSignalCharacterUnselected()

OnCharacterSelected(CharacterComponent)

public void OnCharacterSelected(CharacterComponent character)

Parameters

character CharacterComponent

OnCharacterUnselected()

public void OnCharacterUnselected()

_Input(InputEvent)

Called when there is an input event. The input event propagates up through the node tree until a node consumes it. It is only called if input processing is enabled, which is done automatically if this method is overridden, and can be toggled with . To consume the input event and stop it propagating further to other nodes, can be called. For gameplay input, and are usually a better fit as they allow the GUI to intercept the events first. Note: This method is only called if the node is present in the scene tree (i.e. if it's not an orphan).

public override void _Input(InputEvent @event)

Parameters

event InputEvent

_Ready()

Called when the node is "ready", i.e. when both the node and its children have entered the scene tree. If the node has children, their callbacks get triggered first, and the parent node will receive the ready notification afterwards. Corresponds to the notification in . See also the @onready annotation for variables. Usually used for initialization. For even earlier initialization, may be used. See also . Note: This method may be called only once for each node. After removing a node from the scene tree and adding it again, will not be called a second time. This can be bypassed by requesting another call with , which may be called anywhere before adding the node again.

public override void _Ready()

ActionSelected

public event EventBus.ActionSelectedEventHandler ActionSelected

Event Type

EventBus.ActionSelectedEventHandler

AttributeChanged

public event EventBus.AttributeChangedEventHandler AttributeChanged

Event Type

EventBus.AttributeChangedEventHandler

CharacterSelected

public event EventBus.CharacterSelectedEventHandler CharacterSelected

Event Type

EventBus.CharacterSelectedEventHandler

CharacterUnselected

public event EventBus.CharacterUnselectedEventHandler CharacterUnselected

Event Type

EventBus.CharacterUnselectedEventHandler

Tem uma sugestão? 💡