Class WalkingCharacter

java.lang.Object
com.mg105.entities.WalkingCharacter

public class WalkingCharacter extends Object
Information about the player being placed on the map.
  • Constructor Details

    • WalkingCharacter

      public WalkingCharacter(@NotNull @NotNull Point position)
      Create a new WalkingCharacter at a given position.
      Parameters:
      position - the initial position of the player.
  • Method Details

    • getCharPosition

      public Point getCharPosition()
      Return the position of the walking character.
      Returns:
      the coordinates that the walking character is at.
    • setCharPosition

      public void setCharPosition(@NotNull @NotNull Point position)
      Set the walking character's coordinates.
      Parameters:
      position - the new position of the walking character.
    • getSpriteName

      @NotNull public @NotNull String getSpriteName()
      Returns the name of the character whose sprite is currently being used.
      Returns:
      a sprite name String.
    • setSpriteName

      public void setSpriteName(@NotNull @NotNull String spriteName)
      Sets the name of the character whose sprite is currently being used.
      Parameters:
      spriteName - name of the character to change the sprite to.