Skip to content

Commit

Permalink
Load collision information
Browse files Browse the repository at this point in the history
  • Loading branch information
TheRamenChef committed May 18, 2020
1 parent 7fd7a11 commit 714dd6e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,6 @@ public interface ITilesetEntry extends ICustomPropertyProvider {
public ITileset getTileset();

public String getType();

public IMapObjectLayer getCollisionInfo();
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlTransient;

import de.gurkenlabs.litiengine.environment.tilemap.IMapObjectLayer;
import de.gurkenlabs.litiengine.environment.tilemap.ITerrain;
import de.gurkenlabs.litiengine.environment.tilemap.ITileAnimation;
import de.gurkenlabs.litiengine.environment.tilemap.ITileset;
Expand Down Expand Up @@ -40,6 +41,9 @@ public class TilesetEntry extends CustomPropertyProvider implements ITilesetEntr
@XmlAttribute
private String type;

@XmlElement(name="objectgroup")
private MapObjectLayer collisionData;

/**
* Instantiates a new <code>TilesetEntry</code>.
*/
Expand Down Expand Up @@ -104,6 +108,11 @@ public String getType() {
return this.type;
}

@Override
public IMapObjectLayer getCollisionInfo() {
return this.collisionData;
}

protected void setTerrains(ITerrain[] terrains) {
this.terrains = terrains;
}
Expand Down

0 comments on commit 714dd6e

Please sign in to comment.