示例#1
0
        private void RequestAsset(Entity entity, MandatoryAssetsFirstLoadingComponent.MandatoryRequestsState requestsState, NotCompletedMandatoryAssetsLoadingNode mandatoryLoading)
        {
            AssetRequestComponent assetRequest = new AssetRequestComponent(100);

            mandatoryLoading.mandatoryAssetsFirstLoading.MarkAsRequested(assetRequest, requestsState);
            entity.AddComponent(assetRequest);
            this.ShowLoadingScreenIfAllAssetsAreRequired(mandatoryLoading);
        }
示例#2
0
        protected override void Activate()
        {
            this.entity.Entity.AddComponent(new AssetReferenceComponent(this.audioResourcesRef));
            AssetRequestComponent component = new AssetRequestComponent {
                AssetStoreLevel = AssetStoreLevel.MANAGED
            };

            this.entity.Entity.AddComponent(component);
        }
示例#3
0
        public void RequestWarmupResources(NodeAddedEvent e, WarmupResourcesNode node)
        {
            AssetRequestComponent component = new AssetRequestComponent {
                AssetStoreLevel = AssetStoreLevel.STATIC,
                Priority        = 100
            };

            node.Entity.AddComponent(component);
            if (< > f__am$cache0 == null)
            {
        public void ProcessRequest(AssetRequestEvent e, Node any)
        {
            Entity entity = base.CreateEntity("AssetLoadByEventRequest");

            entity.AddComponent(new AssetReferenceComponent(new AssetReference(e.AssetGuid)));
            LoadByEventRequestComponent component = new LoadByEventRequestComponent {
                ResourceDataComponentType = e.ResourceDataComponentType,
                Owner = any.Entity
            };

            entity.AddComponent(component);
            AssetRequestComponent component2 = new AssetRequestComponent {
                Priority        = e.Priority,
                AssetStoreLevel = e.StoreLevel
            };

            entity.AddComponent(component2);
            e.LoaderEntity = entity;
        }
示例#5
0
        private void StartLoading()
        {
            this.startedLoading = true;
            if (this.progressBar != null)
            {
                this.progressBar.SetActive(true);
            }
            Entity entity = EngineService.Engine.CreateEntity("ScenesLoader");

            entity.AddComponent(new AssetReferenceComponent(this.sceneListRef));
            AssetRequestComponent component = new AssetRequestComponent {
                AssetStoreLevel = AssetStoreLevel.MANAGED
            };

            entity.AddComponent(component);
            SceneLoaderComponent component2 = new SceneLoaderComponent {
                sceneName = string.Empty + base.GetInstanceID()
            };

            entity.AddComponent(component2);
        }
示例#6
0
 public void MarkAsRequested(AssetRequestComponent assetRequest, MandatoryRequestsState mandatoryRequestsState)
 {
     this.currentRequestsState |= mandatoryRequestsState;
     this.assetsRequests.Add(assetRequest);
 }
示例#7
0
 public bool IsAssetRequestMandatory(AssetRequestComponent assetRequest) =>
 this.assetsRequests.Contains(assetRequest);