public void SetTheme(int nThemeId) { ThemeVO themevo = GameData.Inst.ThemeList.Find(a => a.Id == nThemeId); m_txtThemeName.text = themevo.ThemeName; SoundController.Inst.PlayBGM(themevo.BackgroundSoundName); }
public void Init() { ThemeVO theme = GameData.Inst.ThemeList.Find(a => a.Id == GameController.Inst.ThemeId); List <Sprite> sprtList = GameData.Inst.GetStageSpriteList(theme.Id); var cellData = Enumerable.Range(0, theme.StageCount) .Select(i => new Example03CellDto { Message = theme.StageList[i].StageName, StageId = theme.StageList[i].StageId , GreySprite = sprtList.Find(a => a.name == theme.StageList[i].BackgroundName + "_640_g"), ColorSprite = sprtList.Find(a => a.name == theme.StageList[i].BackgroundName + "_640") }) .ToList(); scrollView.UpdateData(cellData); }
public List <Sprite> GetStageSpriteList(int nThemeId) { ThemeVO theme = ThemeList.Find(a => a.Id == nThemeId); Sprite[] sprtArr = Resources.LoadAll <Sprite>("Image/" + theme.BackgroundSoundName); List <Sprite> sprtList = new List <Sprite>(); for (int i = 0; i < sprtArr.Length; i++) { sprtList.Add(sprtArr[i]); } return(sprtList); }
private void Start() { m_nHitablePointerId = 0; m_pointerLineDrawer = GameObject.FindObjectOfType <PointLineDrawer>(); m_pointerLineDrawer.OnPointerHit += PointerHitChecker; ThemeVO theme = GameData.Inst.ThemeList.Find(a => a.Id == GameController.Inst.ThemeId); StageVO stage = theme.StageList.Find(a => a.StageId == GameController.Inst.StageId); m_stage = stage; m_imgBG.sprite = GameData.Inst.GetStageSpriteList(GameController.Inst.ThemeId).Find(a => a.name == stage.BackgroundName + "_bg"); }