Skip to content

Commit

Permalink
✏️ Typo
Browse files Browse the repository at this point in the history
  • Loading branch information
ImNotAVirus committed Sep 21, 2023
1 parent ca217ac commit 43f1488
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
defmodule GameService.Events.DirectionChanged do
defmodule GameService.Events.ChangeDirection do
@moduledoc """
Event triggered when an Entity change his direction.
"""
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
defmodule GameService.Events.Movement do
defmodule GameService.Events.EntityMove do
@moduledoc """
Event triggered when an Entity move.
"""
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
defmodule GameService.Events.Sitting do
defmodule GameService.Events.EntitySit do
@moduledoc """
Event triggered when an Entity sitting down or standing up.
"""
Expand Down
12 changes: 6 additions & 6 deletions apps/game_service/lib/game_service/systems/entity_map_actions.ex
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ defmodule GameService.EntityMapActionsSystem do
GameService.EntityComponents.SittingComponent
],
event_subscriptions: [
GameService.Events.DirectionChanged,
GameService.Events.ChangeDirection,
GameService.Events.EntityInfoRequest,
GameService.Events.Movement,
GameService.Events.Sitting
GameService.Events.EntityMove,
GameService.Events.EntitySit
]

require Logger
Expand All @@ -28,7 +28,7 @@ defmodule GameService.EntityMapActionsSystem do
alias GameService.EntityComponents, as: E

alias GameService.Events.{
DirectionChanged
ChangeDirection
# EntityInfoRequest,
# Movement,
# Sitting
Expand All @@ -37,8 +37,8 @@ defmodule GameService.EntityMapActionsSystem do
# System behaviour

@impl true
def run(%DirectionChanged{} = event, _delta) do
%DirectionChanged{
def run(%ChangeDirection{} = event, _delta) do
%ChangeDirection{
entity_type: entity_type,
entity_id: entity_id,
value: value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ defmodule GameService.EntityMapActionsSystemTest do
direction = %E.DirectionComponent{value: :south}
entity = spawn_player(components: [position, direction])

# Call our System with a DirectionChanged event
event = %Evt.DirectionChanged{
# Call our System with a ChangeDirection event
event = %Evt.ChangeDirection{
entity_type: :character,
entity_id: GameService.entity_id(entity),
value: :north
Expand Down

0 comments on commit 43f1488

Please sign in to comment.