Example #1
0
        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);
        }
Example #2
0
        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 }
     });
 }
Example #4
0
 private void AddStartItemCommandExecute()
 {
     StartItems.Add(new ItemUnit(NewStartItemType.ItemType, NewStartItemCount.Value));
 }
 public void Init()
 {
     StartItemsData = UtilityXML.LoadFromXml <StartItems>(@"startItems.xml");
     GetListBoxShowItemsCount();
     UpdateListItems(m_startIndex);
 }
Example #6
0
 public void TestMethod2()
 {
     StartItems startItems = UtilityXML.LoadFromXml <StartItems>(@"D://Text.xml");
     int        count      = startItems.Count;
 }
Example #7
0
        public void TestMethod1()
        {
            StartItems startItems = new StartItems();

            UtilityXML.SaveToXml(@"D://Text.xml", startItems, typeof(StartItems));
        }