示例#1
0
 public static void ResetControlKnowldge()
 {
     GlobalSave.Put("control_use", false);
     GlobalSave.Put("control_swap", false);
     GlobalSave.Put("control_roll", false);
     GlobalSave.Put("control_interact", false);
     GlobalSave.Put("control_duck", false);
     GlobalSave.Put("control_bomb", false);
     GlobalSave.Put("control_active", false);
 }
示例#2
0
        public override void Generate(Area area)
        {
            Values.Clear();
            Run.ResetStats();

            if (GlobalSave.IsFalse("finished_tutorial"))
            {
                if (BK.Version.Dev)
                {
                    GlobalSave.Put("finished_tutorial", true);
                }
                else if (Run.Depth != -2 && Run.Depth != -3)
                {
                    Run.Depth    = -3;
                    Run.IntoMenu = true;
                    Log.Info("Throwing the player into tutorial");
                }
            }

            Put("mimic_chance", 0.2f);
        }
示例#3
0
        public static void RenderDebug()
        {
            if (!WindowManager.Save)
            {
                return;
            }

            ImGui.SetNextWindowSize(size, ImGuiCond.Once);

            if (!ImGui.Begin("Save Debug"))
            {
                ImGui.End();
                return;
            }

            filter.Draw("Search##sd");
            ImGui.Checkbox("Global", ref global);
            ImGui.Separator();

            var height = ImGui.GetStyle().ItemSpacing.Y;

            ImGui.BeginChild("ScrollingRegionItems", new System.Numerics.Vector2(0, -height),
                             false, ImGuiWindowFlags.HorizontalScrollbar);

            var k = (global ? GlobalSave.Values : GameSave.Values).Keys;

            foreach (var i in k)
            {
                ImGui.PushID(i);

                if (filter.PassFilter(i))
                {
                    var s       = i;
                    var changed = false;

                    ImGui.PushItemWidth(100);
                    if (ImGui.InputText($"##{i}", ref s, 128))
                    {
                        changed = true;
                    }

                    ImGui.PopItemWidth();

                    var v = (global ? GlobalSave.Values : GameSave.Values)[i];

                    if (v == null)
                    {
                        continue;
                    }

                    ImGui.SameLine();

                    if (ImGui.InputText($"##v_v{i}", ref v, 128) || changed)
                    {
                        if (global)
                        {
                            GlobalSave.Values.Remove(i);
                            GlobalSave.Put(s, v);
                        }
                        else
                        {
                            GameSave.Values.Remove(i);
                            GameSave.Put(s, v);
                        }
                    }
                }

                ImGui.PopID();
            }

            ImGui.EndChild();
            ImGui.End();
        }