Exemplo n.º 1
0
        private void RunApp()
        {
            AppPreseneter.Content = app.Run();
            app.Initialize();
            IList <AppMenu> menus = app.GetMenus();

            Loaded += OnLoaded;
            if (menus == null)
            {
                return;
            }
            foreach (var menu in menus)
            {
                RoundButton button = new RoundButton
                {
                    IconPath  = menu.IconPath,
                    FillBrush = menu.FillColor
                };
                button.Click += (object sender, RoutedEventArgs e) => menu.OnClick();
                AppControls.Children.Add(button);
            }
        }
Exemplo n.º 2
0
        void Awake()
        {
            if (!Runtime.IsEditor)
            {
                sInstance = this;
                DontDestroyOnLoad(gameObject);
                MobileApp.Initialize();

                TimerManager.ScheduleTimer(() =>
                {
                    ThreadUtils.InitOnMainThread(); // we need to make sure this call is done on the main thread
                });
            }

            if (!Runtime.IsEditor || startNetworkAnyway)
            {
                mServer = new MobileUdpServer();
                mServer.Start(appIdentifier, port, this);
            }
        }