Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/isadorasophia/murder into main
Browse files Browse the repository at this point in the history
  • Loading branch information
saint11 committed Jul 24, 2023
2 parents 3e7cf84 + 45e1939 commit 850ae51
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using ImGuiNET;
using Murder.Editor.ImGuiExtended;
using Murder.Utilities;
using Murder.Systems.Effects;

namespace Murder.Editor.CustomComponents
{
Expand Down Expand Up @@ -156,16 +157,16 @@ private void SelectAnimation(string[] animations)

if (ImGuiHelpers.IconButton('\uf04b', "##select_animation_for_event"))
{
StageHelpers.ToggleSystem(typeof(EventListenerSystem), true);

StageHelpers.AddComponentsOnSelectedEntityForWorldOnly(
new AnimationOverloadComponent(animations[_lastAnimationSelected], loop: false, ignoreFacing: true));

StageHelpers.ToggleSystem(typeof(EventListenerComponent), true);
}

ImGui.SameLine();
if (ImGuiHelpers.IconButton('\uf04c', "##unselect_animation_for_event"))
{
StageHelpers.ToggleSystem(typeof(EventListenerComponent), false);
StageHelpers.ToggleSystem(typeof(EventListenerSystem), false);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/Murder/Systems/Effects/EventListenerSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace Murder.Systems.Effects
[DefaultEditorSystem(startActive: false)]
[Filter(typeof(EventListenerComponent))]
[Messager(typeof(AnimationEventMessage))]
internal class EventListenerSystem : IMessagerSystem
public class EventListenerSystem : IMessagerSystem
{
public void OnMessage(World world, Entity entity, IMessage message)
{
Expand Down

0 comments on commit 850ae51

Please sign in to comment.