public override void LoadContent() { /* init values */ loadStartTime = loadEndTime = string.Empty; this.gameCount = 0; /* for Load Content */ xmlManager<PanelPlayer> panelPlayerLoader = new xmlManager<PanelPlayer>(); PanelPlayer = panelPlayerLoader.Load("Load/PlayBMS/PanelPlayer.xml"); xmlManager<PanelInfo> panelInfoLoader = new xmlManager<PanelInfo>(); PanelInfo = panelInfoLoader.Load("Load/PlayBMS/PanelInfo.xml"); /* Load Content */ base.LoadContent(); PanelPlayer.LoadContent(); PanelInfo.LoadContent(); Tune = new Tune("./Content/indication_ogg/indication_normal.bme"); }
/* public void LoadcontentNoteList(int gameCount, BmsData bmsData) { switch (bmsData.Channel) { case 10: break; case 11: foreach (Object obj in bmsData.Objects) { if (gameCount < obj.Time && obj.Time < gameCount + 10000) { Image whiteNote = new Image(); whiteNote.Path = "PlayBMS/White"; whiteNote.Scale = new Vector2(20, 5); whiteNote.Position = new Vector2(80, 400 - (obj.Time - gameCount)/32); whiteNote.LoadContent(); WhiteNoteList.Add(whiteNote); } } break; default: break; } } */ public void UpdateNoteList(int gameCount, Tune tune) { foreach(BmsData bmsData in tune.ListBmsData) { if(10 <= bmsData.Channel && bmsData.Channel <= 19) //if 1P channel { int ch = bmsData.Channel; int key = 0; int noteX = 0; string path = ""; Vector2 scale = new Vector2(0, 0); if (AssignWhiteNote.Contains(ch)) { key = 1 + 2 * AssignWhiteNote.IndexOf(ch); path = "PlayBMS/White"; scale = new Vector2(22, 5); } else if (AssignBlueNote.Contains(ch)) { key = 2 * (AssignBlueNote.IndexOf(ch) + 1); path = "PlayBMS/Blue"; scale = new Vector2(17, 5); } else if (AssignRedNote.Contains(ch)) { key = AssignRedNote.IndexOf(ch) * 0; path = "PlayBMS/Red"; scale = new Vector2(41, 5); } noteX = (int)Lane.Position.X + NoteXList[key]; foreach (Object obj in bmsData.Objects) { if (obj.Time < gameCount) { if (WhiteNoteList.Contains(obj)) { obj.Image.UnloadContent(); WhiteNoteList.Remove(obj); } else if (BlueNoteList.Contains(obj)) { obj.Image.UnloadContent(); BlueNoteList.Remove(obj); } else if (RedNoteList.Contains(obj)) { obj.Image.UnloadContent(); RedNoteList.Remove(obj); } } else if (gameCount <= obj.Time && obj.Time <= gameCount + 10000) { Vector2 position = new Vector2(noteX, Lane.Position.Y + Lane.Texture.Height - (obj.Time - gameCount) / 32); if (AssignWhiteNote.Contains(ch) && !WhiteNoteList.Contains(obj)) { obj.LoadContent(path, scale, position); WhiteNoteList.Add(obj); } else if (AssignBlueNote.Contains(ch) && !BlueNoteList.Contains(obj)) { obj.LoadContent(path, scale, position); BlueNoteList.Add(obj); } else if (AssignRedNote.Contains(ch) && !RedNoteList.Contains(obj)) { obj.LoadContent(path, scale, position); RedNoteList.Add(obj); } else { obj.Image.Position = position; } } } } } }