コード例 #1
0
        private async Task InitializateSystems()
        {
            await BackgroundSystem.Initializate();

            await DeviceSystem.Initializate();

            ResourceLoader = ResourceLoader.GetForViewIndependentUse();
            NotificationSystem.Initializate();
            await CallSystem.Initializate();
        }
コード例 #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> ();
    }
コード例 #3
0
        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();
        }
コード例 #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();
        }