You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
771 B
42 lines
771 B
package mightypork.rogue.world.gui.interaction;
|
|
|
|
|
|
import mightypork.rogue.world.PlayerFacade;
|
|
import mightypork.rogue.world.World;
|
|
import mightypork.rogue.world.WorldProvider;
|
|
import mightypork.rogue.world.gui.MapView;
|
|
import mightypork.utils.math.constraints.vect.Vect;
|
|
|
|
|
|
public abstract class MapInteractionPlugin {
|
|
|
|
protected final MapView mapView;
|
|
|
|
|
|
public MapInteractionPlugin(MapView mapView)
|
|
{
|
|
super();
|
|
this.mapView = mapView;
|
|
}
|
|
|
|
|
|
protected PlayerFacade getPlayer()
|
|
{
|
|
return mapView.plc.getPlayer();
|
|
}
|
|
|
|
|
|
protected boolean isImmobile()
|
|
{
|
|
return getPlayer().isDead() || getWorld().isPaused();
|
|
}
|
|
|
|
|
|
protected World getWorld()
|
|
{
|
|
return WorldProvider.get().getWorld();
|
|
}
|
|
|
|
|
|
public abstract boolean onClick(Vect mouse, int button, boolean down);
|
|
}
|
|
|