Exemplo n.º 1
0
        private async Task InitializateSystems()
        {
            await BackgroundSystem.Initializate();

            await DeviceSystem.Initializate();

            ResourceLoader = ResourceLoader.GetForViewIndependentUse();
            NotificationSystem.Initializate();
            await CallSystem.Initializate();
        }
Exemplo n.º 2
0
    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();
        }
Exemplo n.º 4
0
        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();
        }