Skip to content

Commit

Permalink
Create shape matcher with separate method (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
Swedz authored Sep 26, 2024
1 parent 8020de1 commit 3f469e1
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,16 @@ public void tick()
this.link();
}

protected ShapeMatcher createShapeMatcher()
{
return new ShapeMatcher(level, worldPosition, orientation.facingDirection, this.getActiveShape());
}

protected void link()
{
if(shapeMatcher == null)
{
shapeMatcher = new ShapeMatcher(level, worldPosition, orientation.facingDirection, this.getActiveShape());
shapeMatcher = this.createShapeMatcher();
shapeMatcher.registerListeners(level);

this.onLink(shapeMatcher);
Expand Down

0 comments on commit 3f469e1

Please sign in to comment.