// bool textbutton; // int textanitime; // tutorial public SongMenu(NoteFileManager noteFileManager,ReportManager reportManager) { this.noteFileManager = noteFileManager; this.reportManager = reportManager; pictures = new Texture2D[50]; leftright = new Texture2D[2]; arrawframe = new int[2]; arrawframebutton = new bool[2]; scene_number = 0; clickPreviousButton = false; clickStartButton = false; }
private Item selectedItem;// public NoteItemShop(ItemManager itemManager, ScoreManager scoreManager, ReportManager reportManager) : base(itemManager, scoreManager, reportManager) { }
public ItemShop(ItemManager itemManager, ScoreManager scoreManager, ReportManager reportManager) { this.itemManager = itemManager; this.scoreManager = scoreManager; this.reportManager = reportManager; darkBackground = false; wearOne = false; buyOne = false; noGold = false; }
/// <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); #if Debug blackRect= Content.Load<Texture2D>(@"Textures\darkBackground"); #endif goldPlusEffect10 = Content.Load<Texture2D>(@"ui\goldPlus10"); goldPlusEffect15 = Content.Load<Texture2D>(@"ui\goldPlus15"); lifePlusEffect10 = Content.Load<Texture2D>(@"ui\lifePlus10"); lifePlusEffect15 = Content.Load<Texture2D>(@"ui\lifePlus15"); darkBackgroundImage = Content.Load<Texture2D>(@"Textures\darkBackground"); go_back = Content.Load<Texture2D>(@"ui\go_back"); go_front = Content.Load<Texture2D>(@"ui\go_front"); //이거 없으면 STARTNOTE TEXTURE가 NULL이라 위치값을 잘못 줄때가 있다. spriteSheet = Content.Load<Texture2D>(@"ui\SpriteSheet8"); backJesture = Content.Load<Texture2D>(@"game1\backJesture"); backJestureManager = new BackJestureManager(backJesture, new Rectangle(0, 0, 204, 204), 10, new Vector2(800, 500)); //타이틀화면 menuScene = new MenuScene(); menuScene.LoadContent(Content); uiEnergyBackground = Content.Load<Texture2D>(@"ui\uiEnergyBackground"); energyDarkBack = Content.Load<Texture2D>(@"ui\energyDarkBack"); processBar = Content.Load<Texture2D>(@"ui\processBar"); processMark = Content.Load<Texture2D>(@"ui\processMark"); //아이템관리 //startnotemanager 생성보다 앞에 있어야 한다. itemManager = new ItemManager(); itemManager.LoadContent(Content); itemManager.Init(); loadingScene = new LoadingScene(); //loadingScene.LoadContent(Content); //게임중 점수관리 scoreManager = new ScoreManager(); //상점 대문2 shopDoor = new ShopDoor(scoreManager); shopDoor.LoadContent(Content); //점수 기록 (TO FILE) reportManager = new ReportManager(scoreManager); /////아이템 상점 -START rightItemShop = new RightItemShop(itemManager, scoreManager, reportManager); rightItemShop.LoadContent(Content); leftItemShop = new LeftItemShop(itemManager, scoreManager, reportManager); leftItemShop.LoadContent(Content); effectItemShop = new EffectItemShop(itemManager, scoreManager, reportManager); effectItemShop.LoadContent(Content); noteItemShop = new NoteItemShop(itemManager, scoreManager, reportManager); noteItemShop.LoadContent(Content); backgroundItemShop = new BackgroundItemShop(itemManager, scoreManager, reportManager); backgroundItemShop.LoadContent(Content); /////아이템 상점 -START //연주자 memberManager = new MemberManager(scoreManager); memberManager.LoadContent(Content); memberManager.init(); /////텍스쳐 로드 -START //배경 //playBackgroud1 = Content.Load<Texture2D>(@"background\ConcertHall_3"); //playBackgroud2 = Content.Load<Texture2D>(@"background\crosswalk3"); //노트,마커 // spriteSheet = Content.Load<Texture2D>(@"Textures\SpriteSheet8"); //드래그 노트 // heart = Content.Load<Texture2D>(@"Textures\heart"); //진행상황 //uiBackground = Content.Load<Texture2D>(@"ui\background"); energy = Content.Load<Texture2D>(@"ui\energy"); //골드 업어 getGold = Content.Load<Texture2D>(@"gold\getGold"); //폰트 georgia = Content.Load<SpriteFont>(@"Fonts\Georgia"); //perfect,good,bad,miss 판정 배너 perfectBanner = Content.Load<Texture2D>(@"judgement\perfect"); goodBanner = Content.Load<Texture2D>(@"judgement\good"); badBanner = Content.Load<Texture2D>(@"judgement\bad"); missBanner = Content.Load<Texture2D>(@"judgement\miss"); noPerson = Content.Load<Texture2D>(@"game1\noperson"); rightHandTextures = itemManager.GetRightHandTexture(); leftHandTextures = itemManager.GetLeftHandTexture(); //드래그 노트 셀떄 one = Content.Load<Texture2D>(@"ui\one"); two = Content.Load<Texture2D>(@"ui\two"); three = Content.Load<Texture2D>(@"ui\three"); previousButton = Content.Load<Texture2D>(@"game1\previousButton"); hoverPreviousButton = Content.Load<Texture2D>(@"game1\hoverPrevious"); nextButton = Content.Load<Texture2D>(@"game1\nextButton"); hoverNextButton = Content.Load<Texture2D>(@"game1\hoverNextButton"); loadingForAngle = Content.Load<Texture2D>(@"ui\LoadingKinect"); // charisma1 = Content.Load<Texture2D>(@"shopdoor\nogold"); /////텍스쳐 로드 -END /////////////////드래그 라인 관련 //드래그 라인 // drawLineNote1 = Content.Load<Texture2D>(@"DrawLine\drawLineNote1"); //드래그 라인 마커점 drawLineMarker = Content.Load<Texture2D>(@"DrawLine\drawLineMark"); gold = Content.Load<Texture2D>(@"gold\gold"); menuGold = Content.Load<Texture2D>(@"game1\menuGold"); levelTexture = Content.Load<Texture2D>(@"game1\level"); //로드하고, 기본적으로 넣어줌 itemManager.LoadFileItem(); //현재 장착한 이펙트의 인덱스를 전체 베이스에 찾음 int effectIndex = itemManager.getEffectIndex(); //콤보 숫자 comboNumberManager = new ComboNumberManager(); comboNumberManager.LoadContent(Content); //***결과화면 숫자 //resultNumberManager = new ResultNumberManager(); // resultNumberManager.LoadContent(Content); tutorialScene = new TutorialScene(); tutorialScene.Load(Content); //드래그 라인 렌더링 dragLineRenderer = new LineRenderer(); //드래그 라인 안의 마커점의 렌더링 dragLineMarkerRenderer = new LineRenderer(); //드래그라인 curveManager = new CurveManager(dragLineRenderer, dragLineMarkerRenderer,dragNoteManager,itemManager); //가이드 라인 렌더링 guideLineRenderer = new LineRenderer(); //가이드 라인 guideLineManager = new GuideLineManager(guideLineRenderer); //텍스쳐 크기 ///////이펙트 생성 -START //폭발 효과 perfectManager = new PerfectExplosionManager(); perfectManager.ExplosionInit(itemManager.GetEffectTexture()[effectIndex], itemManager.GetEffectInitFrame()[effectIndex], itemManager.GetEffectFrameCount()[effectIndex], itemManager.GetEffectScale()[effectIndex], itemManager.GetEffectDulation()[effectIndex]); goodManager = new GoodExplosionManager(); goodManager.ExplosionInit(itemManager.GetGoodEffectTexture()[effectIndex], itemManager.GetEffectInitFrame()[effectIndex], itemManager.GetEffectFrameCount()[effectIndex], itemManager.GetEffectScale()[effectIndex], itemManager.GetEffectDulation()[effectIndex]); badManager = new BadExplosionManager(); badManager.ExplosionInit(itemManager.GetBadEffectTexture()[effectIndex], itemManager.GetEffectInitFrame()[effectIndex], itemManager.GetEffectFrameCount()[effectIndex], itemManager.GetEffectScale()[effectIndex], itemManager.GetEffectDulation()[effectIndex]); //판정 글씨 나타내기 perfectBannerManager = new PerfectBannerManager(); perfectBannerManager.BannerInit(perfectBanner,new Rectangle(0,0,1380,428),/*sprite로 바꾸면 frameCount바꾸기*/1,0.5f,30); goodBannerManager = new GoodBannerManager(); goodBannerManager.BannerInit(goodBanner, new Rectangle(0, 0, 1020, 368),/*sprite로 바꾸면 frameCount바꾸기*/1, 0.5f, 30); badBannerManager = new BadBannerManager(); badBannerManager.BannerInit(badBanner, new Rectangle(0, 0, 782, 400),/*sprite로 바꾸면 frameCount바꾸기*/1, 0.7f, 30); missBannerManager = new MissBannerManager(); missBannerManager.BannerInit(missBanner, new Rectangle(0, 0, 975, 412),/*sprite로 바꾸면 frameCount바꾸기*/1, 0.5f,30); //일단은 miss effect로 goldGetManager = new ExplosionManager(); goldGetManager.ExplosionInit(getGold,new Rectangle(0,0,200,200), 5, 1.0f, 40); ///////이펙트 생성 -END //시작 노트 관리 생성 //여기에 들어가는 텍스쳐가 노트의 텍스쳐가 된다. //상점의 텍스쳐가 들어가야 한다. startNoteManager = new StartNoteManager( spriteSheet, new Rectangle(0, 200, 52, 55), 1); //첫 마커 위치 //마커 위치 처음 시작은 일단 마커매니저의 제일 0번째 것으로 시작 Vector2[] initMarkLocation = MarkManager.GetPattern(0); // removeAreaRec = MarkManager.GetRemoveArea(0); //마크 관리 초기화 (STATIC) //***시작시 마커 위치에 관한 사항 결정 못함. MarkManager.initialize( spriteSheet, new Rectangle(0, 200, 50, 55), 1, initMarkLocation[0], initMarkLocation[1], initMarkLocation[2], initMarkLocation[3], initMarkLocation[4], initMarkLocation[5], startNoteManager ); //카리스마 매니저 charismaManager = new CharismaManager(); charismaManager.LoadContent(Content); //드래그노트 초기화 //이것은 노트 안에서 움직이는 마커점 dragNoteManager = new DragNoteManager( drawLineMarker, itemManager.GetDragNoteBackground()[itemManager.getNoteIndex()], new Rectangle(0, 0, 100, 100), 1, 15, 0, missBannerManager, scoreManager); //충돌관리 생성 collisionManager = new CollisionManager(perfectManager, goodManager, badManager, goldGetManager, scoreManager, memberManager,/*effect크기*/itemManager,perfectBannerManager,goodBannerManager,badBannerManager,missBannerManager,new Vector2(this.Window.ClientBounds.Width,this.Window.ClientBounds.Height),comboNumberManager,charismaManager,dragNoteManager); //노트정보 관리 생성 noteFileManager = new NoteFileManager(); //드래그 라인 렌더링 dragLineRenderer = new LineRenderer(); dragLineMarkerRenderer = new LineRenderer(); //드래그라인 curveManager = new CurveManager(dragLineRenderer, dragLineMarkerRenderer, dragNoteManager,itemManager); // photoManager = new PhotoManager(); // photoManager.LoadContent(Content); //노트파일 읽기 관리 생성 file = new File(startNoteManager, noteFileManager, collisionManager, scoreManager, itemManager, curveManager, guideLineManager, charismaManager); SoundFmod.initialize(file); //곡선택화면 곡 불러오는 폴더 //노래폴더 만들기 위해서 테스트 // String songFile = System.Environment.CurrentDirectory+"\\beethovenSong\\song.txt"; String dir = System.Environment.CurrentDirectory + "\\beethovenSong"; DirectoryInfo di = new DirectoryInfo(dir); if (di.Exists == false) { di.Create(); } //기록 만들기 위해서 테스트 // String songRecordFile = System.Environment.CurrentDirectory + "\\beethovenRecord\\song.txt"; String songRecorddir = System.Environment.CurrentDirectory + "\\beethovenRecord"; DirectoryInfo diRecord = new DirectoryInfo(songRecorddir); if (diRecord.Exists == false) { diRecord.Create(); } //사진 폴더 위해서 테스트 //String picFile = System.Environment.CurrentDirectory + "\\beethovenRecord\\userPicture\\song.txt"; String picddir = System.Environment.CurrentDirectory + "\\beethovenRecord\\userPicture"; String defaultPicture = System.Environment.CurrentDirectory + "\\No_Image.png"; DirectoryInfo diPic = new DirectoryInfo(picddir); if (diPic.Exists == false) { diPic.Create(); FileInfo fileInfo = new FileInfo(defaultPicture); fileInfo.CopyTo(System.Environment.CurrentDirectory + "\\beethovenRecord\\UserPicture\\No_Image.png"); } //곡을 불러오기 file.FileLoading(dir, "*.mnf"); ////드래그노트 초기화 ////이것은 노트 안에서 움직이는 마커점 //dragNoteManager = new DragNoteManager( // drawLineMarker, // new Rectangle(0, 0, 100, 100), // 1, // 15, // 0, // missBannerManager, // scoreManager); //골드 초기화 //크기 0.3 GoldManager.initialize( gold, new Rectangle(0, 0, 200, 200), 1, 70, 0, 0.3f); //*** resultManager = new ResultManager(scoreManager); resultManager.LoadContent(Content); //점수기록판 화면 recordBoard = new RecordBoard(); recordBoard.LoadContent(Content); #if Kinect settingBoard = new SettingBoard(this); settingBoard.LoadContent(Content); #endif showPictureScene = new ShowPictureScene(); showPictureScene.LoadContent(Content); songMenu = new SongMenu(noteFileManager, reportManager); songMenu.Load(Content, graphics.GraphicsDevice); //LOAD REPORT SCORE FILE //점수기록판을 로드해서 게임에 올린다. reportManager.LoadReport(); //골드를 로드해서 게임에 올린다. reportManager.LoadGoldFromFile(); currentSongName = ""; // itemManager.LoadFileItem(); #if Kinect // messageFont = Content.Load<SpriteFont>("MessageFont"); setupKinect(); /*제스쳐 인식인데 전체 구간에서 계속 실행 된다. *이것이 다른것에 영향을 줄 수도 있다. */ activeRecognizer = CreateRecognizer(); //!!! 페이스 인식, 디버깅 시에 잠시 #if StartDetact settingBoard.LoadCheckFile(); if(settingBoard.CheckFaceDetact) { //0 각도 재야함 // 1 각도 잴필요없음 //2 끝남 loadingTime = 0; ts4 = new ThreadStart(FaceDetect); th4 = new Thread(ts4); th4.Start(); } #endif #endif playingPictures = new Queue(); showPictureTextures = new Texture2D[5]; metronomes = new Texture2D[8]; metronomes[0] = Content.Load<Texture2D>(@"metronome\metronome0"); metronomes[1] = Content.Load<Texture2D>(@"metronome\metronome1"); metronomes[2] = Content.Load<Texture2D>(@"metronome\metronome2"); metronomes[3] = Content.Load<Texture2D>(@"metronome\metronome3"); metronomes[4] = Content.Load<Texture2D>(@"metronome\metronome4"); metronomes[5] = Content.Load<Texture2D>(@"metronome\metronome5"); metronomes[6] = Content.Load<Texture2D>(@"metronome\metronome6"); metronomes[7] = Content.Load<Texture2D>(@"metronome\metronome7"); }