コード例 #1
0
ファイル: EngineFactory.cs プロジェクト: Warnestam/MonoGUI
 public static List <BaseEngine> GetEngines(EngineContainer cnt)
 {
     return
         (new List <BaseEngine>
     {
         new BasicLines1Engine(cnt),
         new BasicLines1bEngine(cnt),
         new BasicLines2Engine(cnt),
         new BasicPlaneEngine(cnt),
         new CountEngine(cnt),
         new DustEngine(cnt),
         new FamilyEngine(cnt),
         new FireworkEngine(cnt),
         new FractalPlaneEngine(cnt),
         new FractalPlaneEngine2(cnt),
         new GameEngine(cnt),
         new Gravity1Engine(cnt),
         new Gravity2Engine(cnt),
         new Gravity3Engine(cnt),
         new MyFirstModelEngine(cnt),
         new MyShaderEngine(cnt),
         new PointSprite1aEngine(cnt),
         new PointSprite1bEngine(cnt),
         new PointSprite1cEngine(cnt),
         new PointSprite2aEngine(cnt),
         new PolygonEngine(cnt),
         new RenderTargetEngine(cnt),
         new SpaceShipEngine1(cnt),
         new SpaceShipEngine2(cnt),
         new Star80Engine(cnt)
     });
 }
コード例 #2
0
 /// <summary>
 /// Create the engine
 /// </summary>
 /// <param name="game"></param>
 public Gravity1Engine(EngineContainer cnt) : base(cnt)
 {
     for (int i = 0; i < 100; i++)
     {
         AddParticle();
     }
 }
コード例 #3
0
ファイル: DustEngine.cs プロジェクト: Warnestam/MonoGUI
 /// <summary>
 /// Create the engine
 /// </summary>
 /// <param name="game"></param>
 public DustEngine(EngineContainer cnt) : base(cnt)
 {
     // TODO: Construct any child components here
 }
コード例 #4
0
ファイル: SpaceShipEngine1.cs プロジェクト: Warnestam/MonoGUI
 /// <summary>
 /// Create the engine
 /// </summary>
 /// <param name="game"></param>
 public SpaceShipEngine1(EngineContainer cnt) : base(cnt)
 {
     // TODO: Construct any child components here
 }
コード例 #5
0
ファイル: Gravity3Engine.cs プロジェクト: Warnestam/MonoGUI
 /// <summary>
 /// Create the engine
 /// </summary>
 /// <param name="game"></param>
 public Gravity3Engine(EngineContainer cnt) : base(cnt)
 {
     ReInit();
 }
コード例 #6
0
 public BasicLines2Engine(EngineContainer cnt) : base(cnt)
 {
     // TODO: Construct any child components here
 }
コード例 #7
0
 /// <summary>
 /// Create the engine
 /// </summary>
 /// <param name="game"></param>
 public RenderTargetEngine(EngineContainer cnt) : base(cnt)
 {
 }
コード例 #8
0
 /// <summary>
 /// Create the engine
 /// </summary>
 /// <param name="game"></param>
 public PointSprite2aEngine(EngineContainer cnt) : base(cnt)
 {
 }
コード例 #9
0
 /// <summary>
 /// Create the engine
 /// </summary>
 public PolygonEngine(EngineContainer cnt) : base(cnt)
 {
 }
コード例 #10
0
 /// <summary>
 /// Create the engine
 /// </summary>
 /// <param name="game"></param>
 public GameEngine(EngineContainer cnt) : base(cnt)
 {
 }
コード例 #11
0
 /// <summary>
 /// Create the engine
 /// </summary>
 public CountEngine(EngineContainer cnt) : base(cnt)
 {
 }
コード例 #12
0
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            fEngine           = new GuiEngine(this, fOptions, fGraphics);
            fEngine.OnResize += FEngine_OnResize;

            fFpsEngine = new FpsEngine(this);

            fInputManager = fEngine.InputManager;// new InputManager(this);

            fWindow1 = new MainWindow(fEngine);
            //fWindow2 = new GuiWindow()
            //{
            //    BackgroundColor = Color.Yellow,
            //    Content = new GuiExpandablePanel()
            //    {
            //        Content = new GuiLabel() { Text = "Now you see me" },
            //        PanelState = GuiExpandablePanelState.Expanded,
            //        Title = new GuiDockChild()
            //        {
            //            Dock = GuiDock.Top,
            //            Control = new GuiLabel() { Text = "Click to expand" }
            //        },
            //    }
            //};

            GuiStackPanel menuPanel = new GuiStackPanel()
            {
                BackgroundColor = new Color(Color.DarkSlateBlue, 0.7f)
            };

            fExPanel = new GuiExpandablePanel()
            {
                Content    = menuPanel,
                PanelState = GuiExpandablePanelState.Collapsed,
                Title      = new GuiDockChild()
                {
                    Dock    = GuiDock.Top,
                    Control = new GuiLabel()
                    {
                        Text = "Click", BackgroundColor = new Color(Color.Black, 0.7f), ForegroundColor = Color.White
                    },
                },
            };

            fWindow2 = new GuiWindow()
            {
                Title = new GuiDockChild()
                {
                    Dock    = GuiDock.Bottom,
                    Control = fExPanel,
                },
                Content = new GuiPanel()
                {
                },                             // Fill upp window
                //Content = new GuiPanel() { Width=0, Height=0},
                Border = new GuiBorder()
                {
                    Border = new GuiThickness(1), BorderColor = Color.Red
                }
            };

            fEngine.AddWindow(fWindow1);
            fEngine.AddWindow(fWindow2);

            //var w = new BasicLines1EngineControlWindow(fEngine);
            //fEngine.AddWindow(w);
            //fEngine.AddWindow(new MainWindow(fEngine));

            this.Components.Add(fEngine);
            this.Components.Add(fFpsEngine);
            //this.Components.Add(fInputManager);

            fContainer           = new EngineContainer(this, fGraphics, fInputManager, fEngine, fFpsEngine);
            fContainer.BackColor = Color.Transparent;

            fEngines = EngineFactory.GetEngines(fContainer);

            foreach (var engine in fEngines)
            {
                engine.DoInitialize();
            }

            var index = 0;

            foreach (var engine in fEngines)
            {
                var label = new GuiLabel()
                {
                    Text            = engine.GetName(),
                    BackgroundColor = new Color(Color.Gray, 0.5f),
                    ForegroundColor = Color.White,
                };
                label.OnClick += Label_OnClick;
                label.Tag      = index++;
                menuPanel.Childs.Add(new GuiStackChild()
                {
                    Control = label
                });
            }

            base.Initialize();
        }
コード例 #13
0
 /// <summary>
 /// Create the engine
 /// </summary>
 /// <param name="game"></param>
 public FractalPlaneEngine(EngineContainer cnt) : base(cnt)
 {
 }
コード例 #14
0
ファイル: Star80Engine.cs プロジェクト: Warnestam/MonoGUI
 /// <summary>
 /// Create the engine
 /// </summary>
 /// <param name="game"></param>
 public Star80Engine(EngineContainer cnt) : base(cnt)
 {
 }
コード例 #15
0
 /// <summary>
 /// Create the engine
 /// </summary>
 /// <param name="game"></param>
 public SpaceShipEngine2(EngineContainer cnt) : base(cnt)
 {
     this.BackColor = Color.Black;
 }
コード例 #16
0
 /// <summary>
 /// Create the engine
 /// </summary>
 /// <param name="game"></param>
 public PointSprite1aEngine(EngineContainer cnt) : base(cnt)
 {
     // TODO: Construct any child components here
 }
コード例 #17
0
 /// <summary>
 /// Create the engine
 /// </summary>
 /// <param name="game"></param>
 public MyFirstModelEngine(EngineContainer cnt) : base(cnt)
 {
     // TODO: Construct any child components here
 }