Exemplo n.º 1
0
 public PlayAssetPackRequestImpl(string assetPackName, AssetPackManager assetPackManager,
                                 PlayRequestRepository requestRepository)
 {
     AssetPackName      = assetPackName;
     _assetPackManager  = assetPackManager;
     _requestRepository = requestRepository;
 }
Exemplo n.º 2
0
 private void Init(AssetPackManager assetPackManager, PlayRequestRepository requestRepository)
 {
     _assetPackManager    = assetPackManager;
     _requestRepository   = requestRepository;
     _stateUpdateListener = new AssetPackStateUpdateListener();
     _stateUpdateListener.OnStateUpdateEvent += OnStateUpdateReceived;
     StartListeningForUpdates();
 }
Exemplo n.º 3
0
        public static AssetDeliveryUpdateHandler CreateInScene(AssetPackManager assetPackManager,
                                                               PlayRequestRepository requestRepository)
        {
            var componentHolder = new GameObject();

            DontDestroyOnLoad(componentHolder);
            componentHolder.name = "AssetDeliveryUpdateHandler";

            var instance = componentHolder.AddComponent <AssetDeliveryUpdateHandler>();

            instance.Init(assetPackManager, requestRepository);

            return(instance);
        }