private async Task InitializateSystems() { await BackgroundSystem.Initializate(); await DeviceSystem.Initializate(); ResourceLoader = ResourceLoader.GetForViewIndependentUse(); NotificationSystem.Initializate(); await CallSystem.Initializate(); }
public void SetPlanet(int id) { planetID = id; Destroy(currentSystem.gameObject); GameObject backgroundObject = (GameObject)Instantiate(Resources.Load("Prefabs/Backgrounds/planet_" + id.ToString() + "/backgroundSystem")); backgroundObject.transform.SetParent(controllerTransform); backgroundObject.transform.position = new Vector3(0, 0, 10); currentSystem = backgroundObject.GetComponent <BackgroundSystem> (); }
public RendererSystemSwitcher(SpriteFont spriteFont, SpriteFont vectorFont, World world) { _spriteFont = spriteFont; _vectorFont = vectorFont; _fontRendererSystem = world.Get <FontRendererSystem>(); _spriteSystem = world.Get <SpriteRendererSystem>(); _polygonalSystem = world.Get <PolygonRendererSystem>(); _backgroundSystem = world.Get <BackgroundSystem>(); RefreshRenderers(); }
protected override async void OnBackgroundActivated(BackgroundActivatedEventArgs args) { base.OnBackgroundActivated(args); BackgroundTaskDeferral deferral = args.TaskInstance.GetDeferral(); if (await ObtainingAccess && PermissionSystem.IsAllPermissionsObtained) { if (Initializating == null) { Initializating = InitializateSystems(); } await Initializating; BackgroundSystem.OnBackgroundActivated(args.TaskInstance); } deferral.Complete(); }