示例#1
0
文件: Main.cs 项目: Tyreyn/JPWP
 /// <summary>
 /// wczytanie zasobów programu numer 1
 /// </summary>
 public Main(GraphicsDevice graphicsDevice)
 {
     menu_Koniec = new Menu_Koniec(graphicsDevice);
     menu_Pauza  = new Menu_Pauza(graphicsDevice);
     _menu       = new Menu(graphicsDevice);
     _kamera     = new Kamera(graphicsDevice);
     akt_postac  = new Postac(graphicsDevice);
     mapa1       = new Mapa(graphicsDevice);
     _podloga    = new Podloga(graphicsDevice);
     _podloga.wczytaj();
     darkness   = new RenderTarget2D(graphicsDevice, Mapa.mapa_1.GetLength(1) * 64, Mapa.mapa_1.GetLength(0) * 64);
     mainTarget = new RenderTarget2D(graphicsDevice, Mapa.mapa_1.GetLength(1) * 64, Mapa.mapa_1.GetLength(0) * 64);
 }
示例#2
0
 /// <summary>
 /// Postać
 /// </summary>
 public Postac(GraphicsDevice graphicsDevice)
 {
     p_startowy          = new Vector2(150, 700);
     this.Hitbox         = new Rectangle((int)p_startowy.X, (int)p_startowy.Y, 32, 58);
     this.ruch_postaci   = new Rectangle(3, 0, 12, 34);
     this.Szer           = 4;
     this.Wysok          = 1;
     this.Animowac       = true;
     this.przyspieszenie = new Vector2(0, 0);
     poprzedniStan       = Keyboard.GetState();
     _podloga            = new Podloga(graphicsDevice);
     shining             = 0.2f;
 }