Пример #1
0
        /// <summary>
        ///     Fired when the game is drawn.
        /// </summary>
        /// <param name="args">The <see cref="EventArgs" /> instance containing the event data.</param>
        private static void Drawing_OnDraw(EventArgs args)
        {
            if (Menu.Item("DrawRange").IsActive())
            {
                Render.Circle.DrawCircle(ObjectManager.Player.Position,
                                         Menu.Item("CalculateRange").GetValue <Slider>().Value, Color.CadetBlue);
            }

            if (Status == CalcStatus.NoEnemies || !DrawCalculation)
            {
                return;
            }

            // Draw box
            BoxLine.Width = Height;
            BoxLine.Begin();
            BoxLine.Draw(new[] { Position, Position + new Vector2(Width, 0) }, new ColorBGRA(0, 0, 0, 256 / 2));
            BoxLine.End();

            // Draw text
            TextFont.DrawText(
                null,
                string.Format("Ally Damage: {0}", (int)allyDamage),
                (int)RealBoxPosition.X + 10,
                (int)RealBoxPosition.Y + 5,
                new ColorBGRA(0, 255, 0, 255));

            TextFont.DrawText(
                null,
                string.Format("Ally Health: {0}", (int)allyHealth),
                (int)(RealBoxPosition.X + 10),
                (int)RealBoxPosition.Y + 5 + TextHeightSpacing,
                new ColorBGRA(0, 255, 0, 255));

            TextFont.DrawText(
                null,
                string.Format("Enemy Damage: {0}", (int)enemyDamage),
                (int)(RealBoxPosition.X + 10),
                (int)RealBoxPosition.Y + 5 + TextHeightSpacing * 2,
                new ColorBGRA(255, 0, 0, 255));

            TextFont.DrawText(
                null,
                string.Format("Enemy Health: {0}", (int)enemyHealth),
                (int)(RealBoxPosition.X + 10),
                (int)RealBoxPosition.Y + 5 + TextHeightSpacing * 3,
                new ColorBGRA(255, 0, 0, 255));
        }
Пример #2
0
        protected override void OnAppearing()
        {
            base.OnAppearing();

            #region initial animation values
            Confirmation.Opacity          = 0;
            PatientDocUserDetails.Opacity = 0;
            BoxLine.Opacity             = 0;
            CarouselViewGrid.Opacity    = 0;
            FingerPrintIconGrid.Opacity = 0;
            #endregion

            #region Animations
            Confirmation.FadeTo(1, 3000, Easing.SinInOut);

            PatientDocUserDetails.FadeTo(1, 3200, Easing.SinInOut);

            BoxLine.FadeTo(1, 3300, Easing.SinInOut);

            CarouselViewGrid.FadeTo(1, 3400, Easing.SinInOut);

            FingerPrintIconGrid.FadeTo(1, 3500, Easing.SinInOut);
            #endregion
        }
Пример #3
0
 /// <summary>
 ///     Fired when the DirectX device is reset.
 /// </summary>
 /// <param name="args">The <see cref="EventArgs" /> instance containing the event data.</param>
 private static void DrawingOnOnPostReset(EventArgs args)
 {
     BoxLine.OnResetDevice();
     TextFont.OnResetDevice();
 }
Пример #4
0
 /// <summary>
 ///     Fired when the DirectX device is lost.
 /// </summary>
 /// <param name="args">The <see cref="EventArgs" /> instance containing the event data.</param>
 private static void Drawing_OnPreReset(EventArgs args)
 {
     BoxLine.OnLostDevice();
     TextFont.OnLostDevice();
 }