Exemplo n.º 1
0
        protected override void OnWorldInitialized(bool restore)
        {
            if (restore)
            {
                Tree.Reset(World);
                return;
            }

            ShadowRectangle
            .Create(World);

            Engine.Renderer.GUIManager.ShowSoftwareCursor = false;
            Tree.Reset(World);
            World.Interactive = false;
            Ego.EnterScene(Tree.Basement.SceneID);

            Tree.Actors.Ryan.EnterScene(Tree.Basement.SceneID);
            Tree.Actors.RyanVoice.EnterScene(Tree.Basement.SceneID);
            Tree.Actors.Mouse.EnterScene(Tree.Basement.SceneID);

            Tree.Cutscenes.Director.StartSession(Cutscenes.Sessions.One);
        }
Exemplo n.º 2
0
        protected void TurnOffBorders()
        {
            object borderElement = FindName("borderAll");

            if (borderElement != null)
            {
                Border border = borderElement as Border;
                border.Style = null;
            }

            object headerPanelElement = FindName("headerPanel");

            if (headerPanelElement != null)
            {
                Controls.GadgetHeaderPanel header = headerPanelElement as Controls.GadgetHeaderPanel;
                header.Visibility = System.Windows.Visibility.Hidden;
            }

            object shadowRectangleElement = FindName("rectangleShadow");

            if (shadowRectangleElement != null)
            {
                ShadowRectangle rectangle = shadowRectangleElement as ShadowRectangle;
                rectangle.Visibility = System.Windows.Visibility.Hidden;
            }

            object infoPanel = FindName("infoPanel");

            if (infoPanel != null)
            {
                GadgetInfoPanel panel = infoPanel as GadgetInfoPanel;
                if (panel.Visibility == System.Windows.Visibility.Visible)
                {
                    panel.Visibility = System.Windows.Visibility.Hidden;
                }
            }
        }
Exemplo n.º 3
0
        protected void TurnOnBorders()
        {
            object borderElement = FindName("borderAll");

            if (borderElement != null)
            {
                Border border = borderElement as Border;
                border.Style = this.Resources["mainGadgetBorder"] as Style;
            }

            object headerPanelElement = FindName("headerPanel");

            if (headerPanelElement != null)
            {
                Controls.GadgetHeaderPanel header = headerPanelElement as Controls.GadgetHeaderPanel;
                header.Visibility = System.Windows.Visibility.Visible;
            }

            object shadowRectangleElement = FindName("rectangleShadow");

            if (shadowRectangleElement != null)
            {
                ShadowRectangle rectangle = shadowRectangleElement as ShadowRectangle;
                rectangle.Visibility = System.Windows.Visibility.Visible;
            }

            object infoPanel = FindName("infoPanel");

            if (infoPanel != null)
            {
                GadgetInfoPanel panel = infoPanel as GadgetInfoPanel;
                if (!string.IsNullOrEmpty(panel.Text))
                {
                    panel.Visibility = System.Windows.Visibility.Visible;
                }
            }
        }