Package com.mg105.entities
Class WalkingCharacter
java.lang.Object
com.mg105.entities.WalkingCharacter
Information about the player being placed on the map.
-
Constructor Summary
ConstructorDescriptionWalkingCharacter
(@NotNull Point position) Create a new WalkingCharacter at a given position. -
Method Summary
Modifier and TypeMethodDescriptionReturn the position of the walking character.@NotNull String
Returns the name of the character whose sprite is currently being used.void
setCharPosition
(@NotNull Point position) Set the walking character's coordinates.void
setSpriteName
(@NotNull String spriteName) Sets the name of the character whose sprite is currently being used.
-
Constructor Details
-
WalkingCharacter
Create a new WalkingCharacter at a given position.- Parameters:
position
- the initial position of the player.
-
-
Method Details
-
getCharPosition
Return the position of the walking character.- Returns:
- the coordinates that the walking character is at.
-
setCharPosition
Set the walking character's coordinates.- Parameters:
position
- the new position of the walking character.
-
getSpriteName
Returns the name of the character whose sprite is currently being used.- Returns:
- a sprite name String.
-
setSpriteName
Sets the name of the character whose sprite is currently being used.- Parameters:
spriteName
- name of the character to change the sprite to.
-