Ejemplo n.º 1
0
        public void Update()
        {
            // Update color
            Brush currentColor = _animationController.GetBotColor(_bot, _bot.GetInfoState());

            if (currentColor != Stroke)
            {
                Stroke = currentColor;
            }
            // Draw current goal of the bot
            _geometry.StartPoint = new Point(_transformer.ProjectX(_bot.GetInfoCenterX()), _transformer.ProjectY(_bot.GetInfoCenterY()));
            if (!double.IsNaN(_bot.GetInfoGoalX()))
            {
                _geometry.EndPoint = new Point(_transformer.ProjectX(_bot.GetInfoGoalX()), _transformer.ProjectY(_bot.GetInfoGoalY()));
            }
            else
            {
                _geometry.EndPoint = new Point(_transformer.ProjectX(_bot.GetInfoCenterX()), _transformer.ProjectY(_bot.GetInfoCenterY()));
            }
        }
Ejemplo n.º 2
0
        public void Update()
        {
            // Update color
            Brush currentColor = _animationController.GetBotColor(_bot, _bot.GetInfoState());

            if (currentColor != Stroke)
            {
                Stroke = currentColor;
            }
            // Draw current goal of the bot
            _geometry.StartPoint = new Point(_transformer.ProjectX(_bot.GetInfoCenterX()), _transformer.ProjectY(_bot.GetInfoCenterY()));
            IWaypointInfo destination = _bot.GetInfoDestinationWaypoint();

            if (destination != null)
            {
                _geometry.EndPoint = new Point(_transformer.ProjectX(destination.GetInfoCenterX()), _transformer.ProjectY(destination.GetInfoCenterY()));
            }
            else
            {
                _geometry.EndPoint = new Point(_transformer.ProjectX(_bot.GetInfoCenterX()), _transformer.ProjectY(_bot.GetInfoCenterY()));
            }
        }