コード例 #1
0
ファイル: UrhoApp.cs プロジェクト: ramelp/UrhoCustomObj
        public static T AddChild <T>(this UrhoApp app, string label) where T : Component
        {
            if (!app.IsInitialized)
            {
                return(null);
            }

            return(app.RootNode.AddChild <T>(label));
        }
コード例 #2
0
        private async Task StopUrhoApp()
        {
            if (_urhoApp != null)
            {
                await _urhoApp.Exit();

                _urhoSurface = null;
                _urhoApp     = null;
                Content      = null;
            }
        }
コード例 #3
0
        public async Task StartUrhoApp()
        {
            if (_urhoSurface == null)
            {
                throw new System.Exception("Urho Surface not defined");
            }

            if (_urhoApp == null)
            {
                //This will fail if called twice within an application
                _urhoApp = await _urhoSurface.Show <UrhoApp>(
                    new ApplicationOptions(assetsFolder : null)
                {
                    Orientation    = ApplicationOptions.OrientationType.LandscapeAndPortrait,
                    TouchEmulation = true
                });

                LoadingUrhoTask.SetResult(true);
            }
        }