コード例 #1
0
        /// <summary>
        /// Add basic player components; network, catalogue, session, client and analytics
        /// </summary>
        void InitComponents()
        {
            gameObject.AddComponent <VPlayerController>();
            if (m_network == null)
            {
                m_network = gameObject.AddComponent <VNetwork>();
            }
            if (m_catalogue == null)
            {
                m_catalogue = gameObject.AddComponent <VCatalogue>();
            }
            if (m_session == null)
            {
                m_session = gameObject.AddComponent <VSession>();
            }
            if (m_client == null)
            {
                m_client = gameObject.AddComponent <VClient>();
            }
            if (m_analytics == null)
            {
                m_analytics = gameObject.AddComponent <VAnalytics>();
            }

            VSettings.ValintaApplicationID = string.IsNullOrEmpty(ValintaApplicationID) ? "DeveloperPreviewApplication000" : ValintaApplicationID;
            VSettings.UseWWWForAudioClip   = UseWWWForAudioDownload;

            VClient.OnClientInfoReady += OnClientInfoReady;
            VSession.OnSessionReady   += OnSessionReady;
        }
コード例 #2
0
        // Called when catalogue is downloaded and parsed
        public void CatalogueReady()
        {
            m_currentState.CatalogueReady = true;
            m_catalogue = ValintaPlayer.Instance.GetCatalogueInstance();
            LoadLastPlayedPlaylist();

            UpdatePlayerUI();
        }
コード例 #3
0
ファイル: VSession.cs プロジェクト: nelloe88/PlayerMidiMusic
 void Awake()
 {
     if (m_network == null)
     {
         m_network = ValintaPlayer.Instance.GetNetworkInstance();
     }
     if (m_catalogue == null)
     {
         m_catalogue = ValintaPlayer.Instance.GetCatalogueInstance();
     }
 }