Ejemplo n.º 1
0
        public GameGraphicClass()
        {
            logo = new GraphicClass();
            backGround = new GraphicClass();

            moreButtons = new MenuButtonGraphicClass[numberOfMoreStates];
            for (int i = 0; i < numberOfMoreStates; i++)
                moreButtons[i] = new MenuButtonGraphicClass();

            menuButtons = new MenuButtonGraphicClass[numberOfGameStates];
            for (int i = 0; i < numberOfGameStates; i++)
                menuButtons[i] = new MenuButtonGraphicClass();


        }
Ejemplo n.º 2
0
        public GameGraphicClass()
        {
            logo       = new GraphicClass();
            backGround = new GraphicClass();

            moreButtons = new MenuButtonGraphicClass[numberOfMoreStates];
            for (int i = 0; i < numberOfMoreStates; i++)
            {
                moreButtons[i] = new MenuButtonGraphicClass();
            }

            menuButtons = new MenuButtonGraphicClass[numberOfGameStates];
            for (int i = 0; i < numberOfGameStates; i++)
            {
                menuButtons[i] = new MenuButtonGraphicClass();
            }
        }
Ejemplo n.º 3
0
        public static void LoadContent(SpriteBatch spriteBatch, ContentManager Content)
        {
            Credits.spriteBatch = spriteBatch;

            CreditsTexture = new GraphicClass[Positions];

            for (int i = 0; i < Positions; i++)
			{
                CreditsTexture[i] = new GraphicClass();
			}

            Vector2 centeredPositon = new Vector2(spriteBatch.GraphicsDevice.Viewport.Width / 2, spriteBatch.GraphicsDevice.Viewport.Height / 2);
            float scale = ((float)spriteBatch.GraphicsDevice.Viewport.Width / GameGraphicClass.backGround.texture.Width) < ((float)spriteBatch.GraphicsDevice.Viewport.Height / GameGraphicClass.backGround.texture.Height) ? ((float)spriteBatch.GraphicsDevice.Viewport.Width / GameGraphicClass.backGround.texture.Width) : ((float)spriteBatch.GraphicsDevice.Viewport.Height / GameGraphicClass.backGround.texture.Height);

            CreditsTexture[0].texture = Content.Load<Texture2D>("dys");
            CreditsTexture[1].texture = Content.Load<Texture2D>("madz");

            CreditsTexture[0].position = centeredPositon - new Vector2(0, (CreditsTexture[0].texture.Height / 2));
            CreditsTexture[1].position = centeredPositon + new Vector2(0, (CreditsTexture[1].texture.Height / 2));
        }