private void GetFurthestWayCommandExecute() { var searchParameters = new SearchParameters(new PersonState(StartId, StartItems.ToList()), SearchAlgorithm.Value); List <SearchResultState> newWay = null; // TODO: Change to application start settings Thread thread = new Thread(() => newWay = m_Book.GetWay(searchParameters), 256 * 1024 * 1024); ComputingRunning = true; thread.Start(); thread.Join(); ComputingRunning = false; FoundWay = ConvertWay(newWay); }
public static void InvokeStartItems(GameObject obj, RoleType id, ref List <ItemType> startItems) { StartItems sT = StartItemsEvent; if (sT == null) { return; } StartItemsEvent ev = new StartItemsEvent() { Player = Player.GetPlayer(obj), Role = id, StartItems = startItems }; sT?.Invoke(ev); startItems = ev.StartItems; }
private Dictionary <string, object> GenerateMyDictionary() { return(new Dictionary <string, object> { { k.ID, id }, { k.rewardFee, rewardFee }, { k.missionCategory, (int)missionCategory }, { k.title, title }, { k.description, _description }, { k.type, _missionType }, { k.durationMinutes, durationMinutes }, { k.startItems, StartItems.ToDictionary("c", se => se.ToDictionary()) }, { k.listable, listable }, { k.location, _locationId }, { k.successMessage, _successMessage }, { k.failMessage, failMessage }, { "behaviourType", (int)behaviourType } }); }
private void AddStartItemCommandExecute() { StartItems.Add(new ItemUnit(NewStartItemType.ItemType, NewStartItemCount.Value)); }
public void Init() { StartItemsData = UtilityXML.LoadFromXml <StartItems>(@"startItems.xml"); GetListBoxShowItemsCount(); UpdateListItems(m_startIndex); }
public void TestMethod2() { StartItems startItems = UtilityXML.LoadFromXml <StartItems>(@"D://Text.xml"); int count = startItems.Count; }
public void TestMethod1() { StartItems startItems = new StartItems(); UtilityXML.SaveToXml(@"D://Text.xml", startItems, typeof(StartItems)); }