Exemplo n.º 1
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            Random rand = new Random();


            Grafika.Init(Content, this.GraphicsDevice);
            GlobalAcc.Init();
            Wyposazenie.Inicjalizacja(Content);
            Mapy.Init(this.GraphicsDevice);
            Menu.init();
            Info.init();
            Help.init();
            TestowyFont = Content.Load <SpriteFont>("testfont");

            SpriteAnimated SA = new SpriteAnimated(300, 300, Grafika.Eksplozja3, 60);

            GlobalAcc.ListaAnimacji1.Add(SA);



            // TODO: use this.Content to load your game content here
        }
Exemplo n.º 2
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            Random rand = new Random();


            Grafika.Init(Content, this.GraphicsDevice);
            GlobalAcc.Init();
            Wyposazenie.Inicjalizacja(Content);
            Mapy.Init(this.GraphicsDevice);

            TestowyFont = Content.Load <SpriteFont>("testfont");



            float[]     pozycjeX = { 100, 100, 400, 400, 100 };
            float[]     pozycjeY = { 100, 300, 300, 100, 100 };
            float []    czas     = { 0f, 20f, 70f, 100f, 120f };
            CurveKey [] KurwyX   = new CurveKey[5];
            CurveKey [] KurwyY   = new CurveKey[5];
            for (int i = 0; i < 5; i++)
            {
                KurwyX[i] = new CurveKey(czas[i], pozycjeX[i]);
                KurwyY[i] = new CurveKey(czas[i], pozycjeY[i]);
            }
            kolizja = new Obiekt(new Vector2(750f, 320f), "GuzikN", Content, 0f);
            GlobalAcc.ListaKolizji.Add(kolizja);
            GlobalAcc.ListaObiektow3.Add(kolizja);


            SpriteAnimated SA = new SpriteAnimated(300, 300, Grafika.Eksplozja3, 60);

            GlobalAcc.ListaAnimacji1.Add(SA);



            // TODO: use this.Content to load your game content here
        }