예제 #1
0
        public void MakeHUD(ContentManager pContent)
        {
            switch (Game_State)
            {
            case 1:
                hud            = new List <HUD_icon>();
                Start          = new HUD_icon(pContent, this, 6);
                End            = new HUD_icon(pContent, this, 7);
                Start.Scale    = new Vector2(2.4f, 1.5f);
                End.Scale      = new Vector2(2.4f, 1.5f);
                Start.Position = new Vector2(0, 0 + Start.Texture.Height);
                End.Position   = new Vector2(0, screenSize.Y - (End.Texture.Height * 2));

                hud.Add(Start);
                hud.Add(End);

                break;

            case 2:
                SSV  = new SSV_HollowBack(pContent, this);
                cone = new Targeting(pContent, this);

                ladar = new Ladar(pContent, this);

                hud = new List <HUD_icon>();

                //creating sidebars

                //Left ones
                HUD_icon BellowHud  = new HUD_icon(pContent, this, 0);
                float    yHeight    = screenSize.Y / BellowHud.Texture.Height;
                int      intYHeight = (int)yHeight;
                Vector2  position   = Vector2.Zero;

                float Per = yHeight - intYHeight;

                for (int i = 0; i < 6; i++)
                {
                    BellowHud          = new HUD_icon(pContent, this, i);
                    BellowHud.Position = new Vector2(0, ((i + 1) * (Per * BellowHud.Texture.Height) + (i * BellowHud.Texture.Height)));
                    hud.Add(BellowHud);
                }

                //Right ones
                R_hud = new List <Right_HUD>();

                for (int i = 0; i < 3; i++)
                {
                    Right_HUD argh = new Right_HUD(pContent, this, i);
                    R_hud.Add(argh);
                }
                break;
            }
        }
예제 #2
0
        public void MakeHUD(ContentManager pContent)
        {
            SSV = new SSV_HollowBack(pContent, this);

            hud = new List <Sprite>();

            Sprite  BellowHud  = new Sprite(pContent, "SideBlocks", this);
            float   yHeight    = screenSize.Y / BellowHud.Texture.Height;
            int     intYHeight = (int)yHeight;
            Vector2 position   = Vector2.Zero;

            float Per = yHeight - intYHeight;

            for (int i = 0; i < 6; i++)
            {
                BellowHud          = new Sprite(pContent, "SideBlocks", this);
                BellowHud.Position = new Vector2(0, ((i + 1) * (Per * BellowHud.Texture.Height) + (i * BellowHud.Texture.Height)));
                hud.Add(BellowHud);
            }
        }