public void EndMove(IMovable movable, bool fireevent, bool forceend) { if(this.MovableCache.ContainsKey(movable) && this.MovableCache[movable] == MovementType.TileBased && movable.IsMoving) { ScreenPoint destination = this.GetNextScreenPointTile(movable); if(this.context.CollisionProvider.CheckCollision(movable, destination)) { movable.IgnoreMoveInput = true; movable.MovingDestination = destination; this.MovableCache[movable] = MovementType.Destination; return; } } if((movable.Location.Y % 32) != 0) movable.IsMoving = false; movable.IsMoving = false; movable.IgnoreMoveInput = false; this.RemoveFromCache(movable); if(fireevent) movable.OnStoppedMoving(this, EventArgs.Empty); }