Beispiel #1
0
        ////////////////////////////////////////////////////////////////////////////////////////////////////


        public override void Draw()
        {
            SwinGame.FillEllipse(_colour, _position.X - (_size / 2), _position.Y - (_size / 2), _size, _size);

            if (_selected)
            {
                SwinGame.DrawEllipse(Color.White, _position.X - (_size / 2), _position.Y - (_size / 2), _size, _size);
            }

            SwinGame.DrawLine(_colour, SwinGame.LineFromVector(_position.X, _position.Y, SwinGame.VectorFromAngle(_angleFacing, 100)));
            SwinGame.DrawLine(_colour, SwinGame.LineFromVector(_position.X, _position.Y, SwinGame.VectorFromAngle(_angleFacing + (_fov / 2), 100)));
            SwinGame.DrawLine(_colour, SwinGame.LineFromVector(_position.X, _position.Y, SwinGame.VectorFromAngle(_angleFacing - (_fov / 2), 100)));

            //SwinGame.DrawText(SwinGame.VectorAngle(_movementVector) + "", Color.White, _position.X, _position.Y - 50);
            //SwinGame.DrawText(_movementVector.Magnitude + "", Color.White, _position.X, _position.Y - 10);

            SwinGame.DrawLine(Color.White, _position.X, _position.Y, _movementVector.X + _position.X, _movementVector.Y + _position.Y);

            SwinGame.DrawLine(Color.White, _position.X, _position.Y, (_movementVector.X * 7) + _position.X, (_movementVector.Y * 7) + _position.Y);

            float normalX = (SwinGame.VectorNormal(_movementVector).X *(12));
            float normalY = (SwinGame.VectorNormal(_movementVector).Y *(12));

            SwinGame.DrawLine(Color.White, _position.X + normalX, _position.Y + normalY, (_movementVector.X * 7) + _position.X + normalX, (_movementVector.Y * 7) + _position.Y + normalY);
            SwinGame.DrawLine(Color.White, _position.X - normalX, _position.Y - normalY, (_movementVector.X * 7) + _position.X - normalX, (_movementVector.Y * 7) + _position.Y - normalY);

            SwinGame.DrawLine(_colour, _destination.X - 3, _destination.Y, _destination.X + 3, _destination.Y);
            SwinGame.DrawLine(_colour, _destination.X, _destination.Y - 3, _destination.X, _destination.Y + 3);

            Color temp = SwinGame.RGBAColor(_colour.R, _colour.G, _colour.B, _colour.A);

            SwinGame.DrawCircle(temp, _enLastSeen, _size);

            SwinGame.DrawText(_health + "", Color.White, _position);

            //_movementManager.Draw(_colour);
        }