Esempio n. 1
0
        public static void RefreshSheets()
        {
            List <ADMSheet> list = new List <ADMSheet>();

            foreach (MiniMapControler.IconInfo info in MapUIContainer.Instance.MinimapUI.GetBaseIconInfos())
            {
                BasePoint basePoint = info.Point.GetComponent <BasePoint>();

                Map.Instance.GetBasePointOpenState(basePoint.ID, out bool flag);

                if (!flag)
                {
                    continue;
                }

                list.Add(new ADMSheet(info.Name.Translate(), () => Warp(basePoint.WarpPoint)));
            }

            foreach (KeyValuePair <int, AgentActor> pair in Map.Instance.AgentTable)
            {
                AgentActor agent = pair.Value;

                list.Add(new ADMSheet($"{pair.Key}: {agent.CharaName}",
                                      () => Warp(agent.NavMeshAgent.transform)
                                      ));
            }

            sheet.SetSheets(list);
        }
        public static void RefreshSheets()
        {
            List <ADMSheet>  sheets     = new List <ADMSheet>();
            PlayerActor      player     = Map.Instance.Player;
            PlayerController controller = player.PlayerController;

            DevicePoint[] devices = Object.FindObjectsOfType <DevicePoint>();

            if (devices != null && devices.Length > 0)
            {
                DevicePoint device = devices.FirstOrDefault(v => v.ID == 0);

                if (device != null)
                {
                    sheets.Add(new ADMSheet("数据终端", () =>
                    {
                        MapUIContainer.SystemMenuUI.IsActiveControl = false;

                        Manager.Resources.Instance.SoundPack.Play(SoundPack.SystemSE.BootDevice);
                        MapUIContainer.SetCommandLabelAcception(CommandLabel.AcceptionState.None);

                        player.CurrentDevicePoint = device;

                        MapUIContainer.RefreshCommands(0, player.DeviceCommandInfos);
                        MapUIContainer.SetActiveCommandList(true, "データ端末");
                        controller.ChangeState("DeviceMenu");
                    }));
                }
            }

            sheets.Add(MakeSheet(controller, /*"Item Box"*/ "物品箱", "ItemBox", MapUIContainer.ItemBoxUI));
            sheets.Add(MakeSheet(controller, /*"Bathing Outfits"*/ "更衣处", "DressRoom", MapUIContainer.DressRoomUI));
            sheets.Add(MakeSheet(controller, /*"Closet Outfits"*/ "服装棚", "ClothChange", MapUIContainer.ClosetUI));
            sheets.Add(MakeSheet(controller, /*"Shan's Shop"*/ "商店", null, MapUIContainer.ShopUI, true));

            sheets.Add(new ADMSheet(/*"Kitchen"*/ "灶台", () =>
            {
                MapUIContainer.SystemMenuUI.IsActiveControl = false;

                MapUIContainer.SetCommandLabelAcception(CommandLabel.AcceptionState.None);
                MapUIContainer.RefreshCommands(0, player.CookCommandInfos);
                MapUIContainer.SetActiveCommandList(true, "料理");
                controller.ChangeState("Kitchen");
            }));

            sheets.Add(MakeSheet(controller, /*"Pet Synthesis"*/ "宠物合成", "Craft", MapUIContainer.PetCraftUI, true));
            sheets.Add(MakeSheet(controller, /*"Medicine Table"*/ "制药台", "Craft", MapUIContainer.MedicineCraftUI, true));
            sheets.Add(MakeSheet(controller, /*"Jukebox"*/ "更改BGM", null, MapUIContainer.JukeBoxUI, true));

            sheet.SetSheets(sheets);
        }
        public static void RefreshSheets()
        {
            List <ADMSheet> sheets = new List <ADMSheet>();

            for (int i = 0; i < CATEGORY.Length; i++)
            {
                int n = i;

                sheets.Add(new ADMSheet(
                               CATEGORY[i],
                               current.fileStatus.clothesState[i],
                               0,
                               2,
                               (next, slider) =>
                {
                    if (next == 0)
                    {
                        return;
                    }

                    if (next > 0)
                    {
                        current.SetClothesStateNext(n);
                    }
                    else
                    {
                        current.SetClothesStatePrev(n);
                    }

                    for (int c = 0; c < sheets.Count; c++)
                    {
                        (sheets[c].value as ADMSheetSlider).value = current.fileStatus.clothesState[c];
                    }
                }
                               ));
            }

            sheet.SetSheets(sheets);
        }