Skip to content

Commit

Permalink
Set the collision box size for Triggers implicitly
Browse files Browse the repository at this point in the history
The CollisionBox of a Trigger is always intended to be equal to its BoundingBox. However, when creating a trigger via code instead of via MapObjectLoader (from the map directly) this was previously not guaranteed and it required the size to be set explicitly in order for the Trigger to be usable.
  • Loading branch information
steffen-wilke committed Aug 29, 2020
1 parent 5bce248 commit 9775b9c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/de/gurkenlabs/litiengine/entities/Trigger.java
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ public Trigger(final TriggerActivation activation, final String message, final b
this.message = message;
this.isOneTimeTrigger = isOneTime;
this.activationType = activation;
this.setCollisionBoxWidth(this.getWidth());
this.setCollisionBoxHeight(this.getHeight());
}

/**
Expand Down

0 comments on commit 9775b9c

Please sign in to comment.