Ejemplo n.º 1
0
        public System.Collections.IEnumerator LoadSpriteAssets()
        {
            m_SpritesBundleLoadingRequest = AssetBundle.LoadFromFileAsync(Path.Combine(Application.streamingAssetsPath, "sprites"));
            yield return(m_SpritesBundleLoadingRequest);

            var assetBundle = m_SpritesBundleLoadingRequest.assetBundle;

            if (assetBundle == null)
            {
                Debug.LogWarning("Failed to load AssetBundle!");
                yield break;
            }

            TextAsset catalogContent = Resources.Load("catalog-content") as TextAsset;

            if (!catalogContent)
            {
                Debug.LogWarning("Failed to load AssetBundle!");
                assetBundle.Unload(true);
                yield break;
            }

            Appearances.SpritesProvider spriteProvider = new Appearances.SpritesProvider(assetBundle, catalogContent);
            AppearanceStorage.SetSpriteProvider(spriteProvider);

            BackgroundCenterPanel.gameObject.SetActive(true);
            LobbyPanel.gameObject.SetActive(true);
            LoadingAppearancesWindow.gameObject.SetActive(false);
        }
Ejemplo n.º 2
0
        internal void Unload()
        {
            UnloadSpriteProvider();
            m_SpritesProvider = null;

            m_ObjectTypes?.Clear();
            m_EffectTypes?.Clear();
            m_MissileTypes?.Clear();
            m_OutfitTypes?.Clear();
            m_ProtoAppearances = null;
        }
Ejemplo n.º 3
0
        public void Unload()
        {
            UnloadSpriteProvider();
            _spritesProvider = null;

            _objectTypes?.Clear();
            _effectTypes?.Clear();
            _missileTypes?.Clear();
            _outfitTypes?.Clear();
            _protoAppearances = null;
        }
Ejemplo n.º 4
0
 public void SetSpriteProvider(SpritesProvider spriteProvider) => m_SpritesProvider = spriteProvider;
Ejemplo n.º 5
0
 internal void SetSpriteProvider(SpritesProvider spriteProvider) => m_SpritesProvider = spriteProvider;