using Microsoft.Xna.Framework; using V3.Data; using V3.Map; namespace V3.Objects.Movement { public interface IMovable { /// /// Calculates a path without collisions to desired destination. /// /// Pathfinder to use. /// Current position in pixel. /// Destination in pixel. void FindPath(Pathfinder pathfinder, Vector2 position, Vector2 destination); /// /// Uses pathfinder to for steady movement to new transition. /// /// Current position in pixel. /// Movement speed of the creature. /// Normalized vector * speed which represents a small step in the direction of desired destination.( Vector2 GiveNewPosition(Vector2 currentPosition, int speed); /// /// Calculates the direction the creature is looking when moving. /// MovementDirection GiveMovementDirection(); bool IsMoving { get; } /// /// Save the movement data to a MovementData object. /// /// the MovementData object with the current status MovementData SaveData(); /// /// Restore the movement state from the given data. /// /// the state of the movement to restore void LoadData(MovementData movementData); } }