12345678910111213141516171819202122232425262728 |
- package me.hammerle.supersnuvi.tiles;
- import me.hammerle.supersnuvi.entity.Entity;
- import me.hammerle.supersnuvi.util.Face;
- import me.hammerle.supersnuvi.gamelogic.Level;
- public class GoalTile extends BaseCollisionTile
- {
- public GoalTile(float tMinX, float tMinY, float tMaxX, float tMaxY)
- {
- super(tMinX, tMinY, tMaxX, tMaxY, Tile.SIZE * 0.1f, Tile.SIZE * 0.1f, Tile.SIZE * 0.9f, Tile.SIZE * 0.9f);
- }
- @Override
- public void onEntityCollide(Entity ent, int x, int y, Face face, Level l)
- {
- if(ent.getItemCollector().isHero())
- {
- l.finishLevel();
- }
- }
- @Override
- public float getOffsetY()
- {
- return 1.0f;
- }
- }
|