public Vector2 GetFootPosition() { Point2D cell = DrawHelper.Vector2ToEngineCell(mPosition); cell.Y++; return(DrawHelper.EngineCellToVector(cell)); }
public Point2D GetFootCell() { Point2D cell = DrawHelper.Vector2ToEngineCell(mPosition); cell.Y++; return(cell); }
private void TryMove(EDirection MoveDir, TileMap TileMap) { Point2D newCell = DrawHelper.Vector2ToEngineCell(mPosition) + MoveDir.ToPoint2D(); mCurrentDirection = MoveDir; if (EngineCore.InputHelper.IsKeyDown(Microsoft.Xna.Framework.Input.Keys.LeftShift) == true) { return; // no move, only Dir Change } if (CanMove(newCell, TileMap) == false) { return; } if (Character != null) { Character.Move(newCell); } mFinalPosition = DrawHelper.EngineCellToVector(newCell); }
private Vector2 ClampToCell(Vector2 pos) { Point2D cellPoint = DrawHelper.Vector2ToEngineCell(pos); return(DrawHelper.EngineCellToVector(cellPoint)); }