Пример #1
0
        public MyHonzaInputComponent()
        {
            AddShortcut(MyKeys.None, false, false, false, false,
                        () => "Hammer (CTRL + Mouse left)",
                        null
                        );

            AddShortcut(MyKeys.H, true, true, true, false,
                        () => "Hammer force: " + (MyHonzaInputComponent.HammerForce ? "ON" : "OFF"),
                        delegate
            {
                MyHonzaInputComponent.HammerForce = !MyHonzaInputComponent.HammerForce;
                return(true);
            }
                        );

            AddShortcut(MyKeys.OemPlus, true, true, false, false,
                        () => "Radius+: " + RADIUS,
                        delegate
            {
                RADIUS += 0.5f;
                return(true);
            }
                        );

            AddShortcut(MyKeys.OemMinus, true, true, false, false,
                        () => "",
                        delegate
            {
                RADIUS -= 0.5f;
                return(true);
            }
                        );

            AddShortcut(MyKeys.NumPad7, true, false, false, false,
                        () => "Shown mass: " + ShowRealBlockMass.ToString(),
                        delegate
            {
                ShowRealBlockMass++;
                ShowRealBlockMass = (ShownMassEnum)((int)ShowRealBlockMass % (int)ShownMassEnum.MaxVal);
                return(true);
            });
            AddShortcut(MyKeys.NumPad8, true, false, false, false,
                        () => "MemA: " + m_memoryA + " MemB: " + m_memoryB + " Diff:" + (m_memoryB - m_memoryA),
                        Diff);
            AddShortcut(MyKeys.NumPad9, true, false, false, false,
                        () => "",
                        () => { m_drawBodyInfo = !m_drawBodyInfo; m_drawUpdateInfo = !m_drawUpdateInfo; return(true); });
            AddShortcut(MyKeys.NumPad6, true, false, false, false,
                        () => "Prioritize: " + (MyFakes.PRIORITIZE_PRECALC_JOBS ? "On" : "Off"),
                        () => { MyFakes.PRIORITIZE_PRECALC_JOBS = !MyFakes.PRIORITIZE_PRECALC_JOBS; return(true); });
        }
Пример #2
0
        public MyHonzaInputComponent()
        {
            AddShortcut(MyKeys.None, false, false, false, false,
                        () => "Hammer (CTRL + Mouse left)",
                        null
                        );

            AddShortcut(MyKeys.H, true, true, true, false,
                        () => "Hammer force: " + (MyHonzaInputComponent.HammerForce ? "ON" : "OFF"),
                        delegate
            {
                MyHonzaInputComponent.HammerForce = !MyHonzaInputComponent.HammerForce;
                return(true);
            }
                        );

            AddShortcut(MyKeys.OemPlus, true, true, false, false,
                        () => "Radius+: " + RADIUS,
                        delegate
            {
                RADIUS += 0.5f;
                return(true);
            }
                        );

            AddShortcut(MyKeys.OemMinus, true, true, false, false,
                        () => "",
                        delegate
            {
                RADIUS -= 0.5f;
                return(true);
            }
                        );

            AddShortcut(MyKeys.NumPad7, true, false, false, false,
                        () => "Shown mass: " + ShowRealBlockMass.ToString(),
                        delegate
            {
                ShowRealBlockMass++;
                ShowRealBlockMass = (ShownMassEnum)((int)ShowRealBlockMass % (int)ShownMassEnum.MaxVal);
                return(true);
            });
            AddShortcut(MyKeys.NumPad8, true, false, false, false,
                        () => "MemA: " + m_memoryA + " MemB: " + m_memoryB + " Diff:" + (m_memoryB - m_memoryA),
                        Diff);
        }
        public MyHonzaInputComponent()
        {
            AddShortcut(MyKeys.None, false, false, false, false,
                () => "Hammer (CTRL + Mouse left)",
                null
             );

            AddShortcut(MyKeys.H, true, true, true, false,
                () => "Hammer force: " + (MyHonzaInputComponent.HammerForce ? "ON" : "OFF"),
                delegate
                {
                    MyHonzaInputComponent.HammerForce = !MyHonzaInputComponent.HammerForce;
                    return true;
                }
                );

            AddShortcut(MyKeys.OemPlus, true, true, false, false,
             () => "Radius+: " + RADIUS,
             delegate
             {
                  RADIUS += 0.5f;
                 return true;
             }
             );

             AddShortcut(MyKeys.OemMinus, true, true, false, false,
             () => "",
             delegate
             {
                  RADIUS -= 0.5f;
                 return true;
             }
             );

            AddShortcut(MyKeys.NumPad7, true, false, false, false,
                () => "Shown mass: " + ShowRealBlockMass.ToString(),
                delegate
                {
                    ShowRealBlockMass++;
                    ShowRealBlockMass = (ShownMassEnum)((int)ShowRealBlockMass % (int)ShownMassEnum.MaxVal);
                    return true;
                });
            AddShortcut(MyKeys.NumPad8, true, false, false, false,
                () => "MemA: " + m_memoryA + " MemB: " + m_memoryB + " Diff:" + (m_memoryB - m_memoryA),
               Diff);
        }
            public DefaultComponent()
            {
                AddShortcut(MyKeys.None, false, false, false, false,
                            () => "Hammer (CTRL + Mouse left)",
                            null
                            );

                AddShortcut(MyKeys.H, true, true, true, false,
                            () => "Hammer force: " + (HammerForce ? "ON" : "OFF"),
                            delegate
                {
                    HammerForce = !HammerForce;
                    return(true);
                }
                            );

                AddShortcut(MyKeys.OemPlus, true, true, false, false,
                            () => "Radius+: " + RADIUS,
                            delegate
                {
                    RADIUS += 0.5f;
                    return(true);
                }
                            );

                AddShortcut(MyKeys.OemMinus, true, true, false, false,
                            () => "",
                            delegate
                {
                    RADIUS -= 0.5f;
                    return(true);
                }
                            );

                AddShortcut(MyKeys.NumPad7, true, false, false, false,
                            () => "Shown mass: " + ShowRealBlockMass.ToString(),
                            delegate
                {
                    ShowRealBlockMass++;
                    ShowRealBlockMass = (ShownMassEnum)((int)ShowRealBlockMass % (int)ShownMassEnum.MaxVal);
                    return(true);
                });
                AddShortcut(MyKeys.NumPad8, true, false, false, false,
                            () => "MemA: " + m_memoryA + " MemB: " + m_memoryB + " Diff:" + (m_memoryB - m_memoryA),
                            Diff);
                AddShortcut(MyKeys.NumPad9, true, false, false, false,
                            () => "",
                            () => { m_drawBodyInfo = !m_drawBodyInfo; m_drawUpdateInfo = !m_drawUpdateInfo; return(true); });
                AddShortcut(MyKeys.NumPad6, true, false, false, false,
                            () => "Prioritize: " + (MyFakes.PRIORITIZE_PRECALC_JOBS ? "On" : "Off"),
                            () => { MyFakes.PRIORITIZE_PRECALC_JOBS = !MyFakes.PRIORITIZE_PRECALC_JOBS; return(true); });
                m_dbgComponents.Clear();
#if XB1 // XB1_ALLINONEASSEMBLY
                foreach (var t in MyAssembly.GetTypes())
#else // !XB1
                foreach (var t in Assembly.GetExecutingAssembly().GetTypes())
#endif // !XB1
                {
                    if (t.IsSubclassOf(typeof(MyRenderComponentBase)))
                    {
                        continue;
                    }
                    if (t.IsSubclassOf(typeof(MySyncComponentBase)))
                    {
                        continue;
                    }
                    if (t.IsSubclassOf(typeof(MyEntityComponentBase)))
                    {
                        m_dbgComponents.Add(t);
                    }
                }
            }
            public DefaultComponent()
            {
                AddShortcut(MyKeys.None, false, false, false, false,
                    () => "Hammer (CTRL + Mouse left)",
                    null
                 );

                AddShortcut(MyKeys.H, true, true, true, false,
                    () => "Hammer force: " + (HammerForce ? "ON" : "OFF"),
                    delegate
                    {
                        HammerForce = !HammerForce;
                        return true;
                    }
                    );

                AddShortcut(MyKeys.OemPlus, true, true, false, false,
                 () => "Radius+: " + RADIUS,
                 delegate
                 {
                     RADIUS += 0.5f;
                     return true;
                 }
                 );

                AddShortcut(MyKeys.OemMinus, true, true, false, false,
                () => "",
                delegate
                {
                    RADIUS -= 0.5f;
                    return true;
                }
                );

                AddShortcut(MyKeys.NumPad7, true, false, false, false,
                    () => "Shown mass: " + ShowRealBlockMass.ToString(),
                    delegate
                    {
                        ShowRealBlockMass++;
                        ShowRealBlockMass = (ShownMassEnum)((int)ShowRealBlockMass % (int)ShownMassEnum.MaxVal);
                        return true;
                    });
                AddShortcut(MyKeys.NumPad8, true, false, false, false,
                    () => "MemA: " + m_memoryA + " MemB: " + m_memoryB + " Diff:" + (m_memoryB - m_memoryA),
                   Diff);
                AddShortcut(MyKeys.NumPad9, true, false, false, false,
                    () => "",
                    () => { m_drawBodyInfo = !m_drawBodyInfo; m_drawUpdateInfo = !m_drawUpdateInfo; return true; });
                AddShortcut(MyKeys.NumPad6, true, false, false, false,
                    () => "Prioritize: " + (MyFakes.PRIORITIZE_PRECALC_JOBS ? "On" : "Off"),
                    () => { MyFakes.PRIORITIZE_PRECALC_JOBS = !MyFakes.PRIORITIZE_PRECALC_JOBS; return true; });
                m_dbgComponents.Clear();
                foreach (var t in Assembly.GetExecutingAssembly().GetTypes())
                {
                    if (t.IsSubclassOf(typeof(MyRenderComponentBase)))
                        continue;
                    if (t.IsSubclassOf(typeof(MySyncComponentBase)))
                        continue;
                    if (t.IsSubclassOf(typeof(MyEntityComponentBase)))
                    {
                        m_dbgComponents.Add(t);
                    }
                }

            }
        public MyHonzaInputComponent()
        {
            AddShortcut(MyKeys.None, false, false, false, false,
                () => "Hammer (CTRL + Mouse left)",
                null
             );

            AddShortcut(MyKeys.H, true, true, true, false,
                () => "Hammer force: " + (MyHonzaInputComponent.HammerForce ? "ON" : "OFF"),
                delegate
                {
                    MyHonzaInputComponent.HammerForce = !MyHonzaInputComponent.HammerForce;
                    return true;
                }
                );

            AddShortcut(MyKeys.OemPlus, true, true, false, false,
             () => "Radius+: " + RADIUS,
             delegate
             {
                  RADIUS += 0.5f;
                 return true;
             }
             );

             AddShortcut(MyKeys.OemMinus, true, true, false, false,
             () => "",
             delegate
             {
                  RADIUS -= 0.5f;
                 return true;
             }
             );

            AddShortcut(MyKeys.NumPad7, true, false, false, false,
                () => "Shown mass: " + ShowRealBlockMass.ToString(),
                delegate
                {
                    ShowRealBlockMass++;
                    ShowRealBlockMass = (ShownMassEnum)((int)ShowRealBlockMass % (int)ShownMassEnum.MaxVal);
                    return true;
                });
            AddShortcut(MyKeys.NumPad8, true, false, false, false,
                () => "MemA: " + m_memoryA + " MemB: " + m_memoryB + " Diff:" + (m_memoryB - m_memoryA),
               Diff);
            AddShortcut(MyKeys.NumPad9, true, false, false, false,
                () => "",
                () => { m_drawBodyInfo = !m_drawBodyInfo; m_drawUpdateInfo = !m_drawUpdateInfo; return true; });
            AddShortcut(MyKeys.NumPad6, true, false, false, false,
                () => "Prioritize: " + (MyFakes.PRIORITIZE_PRECALC_JOBS ? "On" : "Off"),
                () => { MyFakes.PRIORITIZE_PRECALC_JOBS = !MyFakes.PRIORITIZE_PRECALC_JOBS; return true; });
        }