VectorToCell() public static method

public static VectorToCell ( Vector2 position ) : Point
position Microsoft.Xna.Framework.Vector2
return Microsoft.Xna.Framework.Point
Example #1
0
        public override void Update()
        {
            PreviousCellPosition = CellPosition;
            CellPosition         = Engine.VectorToCell(Position, Dimension);

            base.Update();
        }
Example #2
0
 public void ChangePosition(float x, float y)
 {
     _position.X   = x;
     _position.Y   = y;
     _cellPosition = Engine.VectorToCell(Position);
 }