unit uMyApp;

interface
uses
  uScene;

type
  TMyApp = class(tSceneMng)
    MainMenu,
    MenuLevel,
    MenuI,
    MenuHow,
    Game : TScene;
    //SceneManager : tSceneMng;
    procedure   Init;
    //procedure   Draw;
    //procedure   Update;
    procedure   Exit;
    constructor Create;
  end;

implementation
uses
  uGame, uMainMenu, uMenuI, uMenuHow,
  zglHeader, GSound, uConst, uMaterials;

{ TMyApp }

constructor TMyApp.Create;
begin
  scr_SetOptions( WinW, WinH, REFRESH_MAXIMUM, False, True);
  wnd_ShowCursor( True );
end;

procedure TMyApp.Init;
begin
  LoadMaterials;
  GSound.InitGS;
  //SceneManager := tSceneMng.Create;
  MainMenu := TMainMenu.Create(Self);
  LevelList1 := TLevelList.Create('1.txt');
  Game := TGame.Create(Self);
  MenuLevel := TMenuLevel.Create(Self, LevelList1);
  MenuI := TMenuI.Create(Self);
  MenuHow := TMenuHow.Create(Self);
  (Game as TGame).Start;
  MainMenu.SetAsScene;
end;

{procedure TMyApp.Draw;
begin
  //Game.Draw;
  SceneManager.Draw;
end; }

procedure TMyApp.Exit;
begin
  Game.Free;
  MenuLevel.Free;
end;



end.
