Skip to content

Commit

Permalink
Fix reactor direction
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaioru committed Sep 28, 2024
1 parent 320fdd3 commit 5b782a6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/common/Edelstein.Common.Gameplay.Game/FieldManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ await template.Footholds.Retrieve(life.Foothold),
if (reactorTemplate == null) continue;
var reactorObj = new FieldReactor(
reactorTemplate,
reactor.Position
reactor.Position,
reactor.Flip
);

await field.Enter(reactorObj);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public record FieldTemplateReactor : IFieldTemplateReactor

public int ReactorTime { get; }

public bool IsFacingLeft { get; }
public bool Flip { get; }
public IPoint2D Position { get; }

public FieldTemplateReactor(IDataNode node)
Expand All @@ -22,7 +22,7 @@ public FieldTemplateReactor(IDataNode node)

ReactorTime = node.ResolveInt("reactorTime") ?? 0;

IsFacingLeft = !(node.ResolveBool("f") ?? false);
Flip = node.ResolveBool("f") ?? false;

Position = new Point2D(
node.ResolveInt("x") ?? int.MinValue,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ public interface IFieldTemplateReactor

int ReactorTime { get; }

bool IsFacingLeft { get; }
bool Flip { get; }
IPoint2D Position { get; }
}

0 comments on commit 5b782a6

Please sign in to comment.