示例#1
0
 //public void GetLevelData(SongDataModel songData) {
 //        DownLoadAndCacheSongData(songData);
 //}
 public void DownLoadAndCacheSongData(SongDataModel songData)
 {
     m_levelData          = new LevelDataModel();
     m_levelData.songData = songData;
     AssetDownloader.Instance.DownloadAndCacheAsset(m_levelData.songData.songURL,
                                                    m_levelData.songData.version,
                                                    OnProgressChanged,
                                                    OnError,
                                                    OnLevelDownloadCompleted
                                                    );
 }
示例#2
0
 private void OnSongItemClicked(SongDataModel songitem)
 {
     if (LivesManager.Instance.CanPlaySong())
     {
         //this.Print("Clicked on song item: " + obj.name + " should process song item clicked = " + ShouldProcessSongItemClick);
         if (ShouldProcessSongItemClick)
         {
             ShouldProcessSongItemClick = false;
             LevelDataModel level = new LevelDataModel();
             level.songData = songitem;
             GameManager.Instance.SessionData.currentLevel = level;
             AnalyticsHelper.Instance.LogClickItem("Play song in HOME");
             SceneManager.Instance.OpenScene(ProjectConstants.Scenes.MainGame);
         }
     }
     else
     {
         LivesManager.Instance.SuggestRechargeLives();
     }
 }
示例#3
0
        private void OnSongItemClicked(SongDataModel obj)
        {
            Debug.Log("<color=red>OnSongItemClicked " + obj.name + "</color>");

            //check if user has enough lives to continue?
            if (LivesManager.Instance.CanPlaySong())
            {
                //this.Print("Clicked on song item: " + obj.name + " should process song item clicked = " + ShouldProcessSongItemClick);
                if (ShouldProcessSongItemClick)
                {
                    ShouldProcessSongItemClick = false;
                    LevelDataModel level = new LevelDataModel();
                    level.songData = obj;
                    GameManager.Instance.SessionData.currentLevel = level;
                    SceneManager.Instance.OpenScene(ProjectConstants.Scenes.MainGame);
                }
            }
            else
            {
                LivesManager.Instance.SuggestRechargeLives();
            }
        }
        //public override void OnEnableFS() {
        //    viewSongList.OnSongClicked -= OnSongClicked;
        //    viewSongList.OnSongClicked += OnSongClicked;
        //}

        //public override o

        private void OnSongClicked(SongDataModel obj)
        {
            //this.Print("Song clicked " + obj.songURL);
        }