using ActionGame.GameArtifacts.Models.Characters;
using ActionGame.GameArtifacts.Models.Game;
using ActionGame.GameResources.Models;


namespace ActionGame.GameArtifacts.Operators
{
    public class ObjectTransporter
    {
        private IMoveableObject moveableObject;
        private GameData gameData;


        public ObjectTransporter(IMoveableObject moveableObject, GameData gameData)
        {
            this.moveableObject = moveableObject;
            this.gameData = gameData;
        }


        public void Transport(WorldPosition worldPosition)
        {
            WorldPosition position = this.moveableObject.WorldPosition;
            position.WorldMapKey = worldPosition.WorldMapKey;
            position.WorldCellX = worldPosition.WorldCellX;
            position.WorldCellY = worldPosition.WorldCellY;
            position.PositionX = worldPosition.PositionX;
            position.PositionY = worldPosition.PositionY;

            MovementPhysics physics = this.moveableObject.MovementPhysics;
            physics.AccelerationX = 0;
            physics.AccelerationY = 0;
            physics.VelocityX = 0;
            physics.VelocityY = 0;
        }

    }
}
