예제 #1
0
        public void PaintTopInGame(ClipState clipState)
        {
            if (Hud.Render.UiHidden)
            {
                return;
            }
            if (clipState != ClipState.BeforeClip)
            {
                return;
            }
            if ((Hud.Game.MapMode == MapMode.WaypointMap) || (Hud.Game.MapMode == MapMode.ActMap))
            {
                return;
            }

            if (!ShowInTown && Hud.Game.IsInTown)
            {
                return;
            }
            if (!ShowOutOfTown && !Hud.Game.IsInTown)
            {
                return;
            }

            var uiRect = Hud.Render.InGameBottomHudUiElement.Rectangle;

            var w = Hud.Window.Size.Height * 0.017f;
            var h = Hud.Window.Size.Height * 0.014f;

            var x = uiRect.Left + uiRect.Width * 0.09f;
            var y = uiRect.Bottom - h - (Hud.Window.Size.Height / 600);

            EliteDecorator.Paint(x + w * 0, y, w, h, HorizontalAlign.Center);
            PhysicalDecorator.Paint(x + w * 1, y, w, h, HorizontalAlign.Center);
            FireDecorator.Paint(x + w * 2, y, w, h, HorizontalAlign.Center);
            LightningDecorator.Paint(x + w * 3, y, w, h, HorizontalAlign.Center);
            ColdDecorator.Paint(x + w * 4, y, w, h, HorizontalAlign.Center);
            PoisonDecorator.Paint(x + w * 5, y, w, h, HorizontalAlign.Center);
            ArcaneDecorator.Paint(x + w * 6, y, w, h, HorizontalAlign.Center);
            HolyDecorator.Paint(x + w * 7, y, w, h, HorizontalAlign.Center);
        }
예제 #2
0
        public void PaintTopInGame(ClipState clipState)
        {
            if (Hud.Render.UiHidden)
            {
                return;
            }
            if (clipState != ClipState.BeforeClip)
            {
                return;
            }

            if (!ShowInTown && Hud.Game.IsInTown)
            {
                return;
            }
            if (!ShowOutOfTown && !Hud.Game.IsInTown)
            {
                return;
            }

            var uiRect = Hud.Render.GetUiElement("Root.NormalLayer.game_dialog_backgroundScreenPC.game_window_hud_overlay").Rectangle;

            var w = Hud.Window.Size.Height * 0.017f;
            var h = Hud.Window.Size.Height * 0.014f;

            var x = uiRect.Left + uiRect.Width * 0.09f;
            var y = uiRect.Bottom - h - (Hud.Window.Size.Height / 600);

            EliteDecorator.Paint(x + w * 0, y, w, h, HorizontalAlign.Center);
            PhysicalDecorator.Paint(x + w * 1, y, w, h, HorizontalAlign.Center);
            FireDecorator.Paint(x + w * 2, y, w, h, HorizontalAlign.Center);
            LightningDecorator.Paint(x + w * 3, y, w, h, HorizontalAlign.Center);
            ColdDecorator.Paint(x + w * 4, y, w, h, HorizontalAlign.Center);
            PoisonDecorator.Paint(x + w * 5, y, w, h, HorizontalAlign.Center);
            ArcaneDecorator.Paint(x + w * 6, y, w, h, HorizontalAlign.Center);
            HolyDecorator.Paint(x + w * 7, y, w, h, HorizontalAlign.Center);
        }
        public IFighter CreateFighter(int lives, int attack, int defense, IEnumerable <string> options)
        {
            IFighter fighter = new Fighter(lives, attack, defense);

            foreach (var option in options)
            {
                switch (option)
                {
                case DOUBLE_HANDED:
                    fighter = new DoubleHandedDecorator(fighter);
                    break;

                case MINION:
                    fighter = new MinionDecorator(fighter, fighter.Lives / 2, fighter.AttackValue / 2);
                    break;

                case POISON:
                    fighter = new PoisonDecorator(fighter, 10);
                    break;

                case SHIELD:
                    fighter = new ShieldDecorator(fighter, 3);
                    break;

                case SHOTGUN:
                    fighter = new ShotgunDecorator(fighter);
                    break;

                case STRENGTHEN:
                    fighter = new StrengthenDecorator(fighter);
                    break;
                }
            }

            return(fighter);
        }