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.
46 lines
646 B
46 lines
646 B
package mightypork.rogue.world;
|
|
|
|
|
|
import mightypork.rogue.world.entity.models.EntityMoveListener;
|
|
|
|
|
|
public class PlayerControl {
|
|
|
|
private final World world;
|
|
|
|
|
|
public PlayerControl(World w)
|
|
{
|
|
this.world = w;
|
|
}
|
|
|
|
|
|
public void walkNorth()
|
|
{
|
|
world.playerEntity.addStep(PathStep.NORTH);
|
|
}
|
|
|
|
|
|
public void walkSouth()
|
|
{
|
|
world.playerEntity.addStep(PathStep.SOUTH);
|
|
}
|
|
|
|
|
|
public void walkEast()
|
|
{
|
|
world.playerEntity.addStep(PathStep.EAST);
|
|
}
|
|
|
|
|
|
public void walkWest()
|
|
{
|
|
world.playerEntity.addStep(PathStep.WEST);
|
|
}
|
|
|
|
|
|
public void addMoveListener(EntityMoveListener eml)
|
|
{
|
|
world.playerEntity.addMoveListener(eml);
|
|
}
|
|
}
|
|
|