Пример #1
0
        /// <summary>
        /// If we are following out target node, this function updates the
        /// camera's position to follow that node.
        /// </summary>
        /// <param name="dt">Delta time</param>
        protected void applyFollowTarget(float dt)
        {
            Vector2 nodePos = _camera.isometricToCartesian(_nodeTarget.PositionIsometric);

            if (_camera.Position == nodePos)
            {
                return;
            }

            _camera.translate(nodePos - _camera.Position);

            if (!_zooming)
            {
                setZoomTarget(1.0f);
            }
        }