/// <summary> /// Method for drawing the move-to cross /// </summary> private void DrawMoveToCross() { if (_inputHandler.DidRightClick() && !_inputHandler.MouseIsOverInterface) { _rightClickWatch.Reset(); _rightClickWatch.Start(); _moveToPos = _player.MoveToPosition; _moveToColor = 1f; } if (_rightClickWatch.IsRunning && _rightClickWatch.ElapsedMilliseconds < 1000) { _moveToColor = _moveToColor - 0.015f; Color color = new Color(_moveToColor, _moveToColor, _moveToColor, _moveToColor); Vector2 pos = _camera.VisualizeCordinates((int)_moveToPos.X - 16, (int)_moveToPos.Y); _spriteBatch.Draw(GetTexture(Texture.MOVE_TO_CROSS), pos, color); } else { _rightClickWatch.Stop(); _rightClickWatch.Reset(); } }
//Metod för utritning av Move-to krysset private void DrawMoveToCross() { if (m_inputHandler.DidRightClick() && !m_inputHandler.MouseIsOverInterface) { m_rightClickWatch.Reset(); m_rightClickWatch.Start(); m_moveToPos = m_player.MoveToPosition; m_moveToColor = 1f; } if (m_rightClickWatch.IsRunning && m_rightClickWatch.ElapsedMilliseconds < 1000) { m_moveToColor = m_moveToColor - 0.015f; Color color = new Color(m_moveToColor, m_moveToColor, m_moveToColor, m_moveToColor); Vector2 pos = m_camera.VisualizeCordinates((int)m_moveToPos.X - 16, (int)m_moveToPos.Y); m_spriteBatch.Draw(m_textures[MOVE_TO_CROSS], pos, color); } else { m_rightClickWatch.Stop(); m_rightClickWatch.Reset(); } }