public void Setup()
	{
		questSet [0] = new Quest();
        questSet [1] = new ItemQuest(itemquest);
		questSet [2] = psychoKilling = new PsychopathKillingQuest ();
		questSet [3] = new ItemDeliveryQuest ();
		questSet [4] = new SlaughterQuest ();
		finalQuest = new PsychopathegeneQuest (itemquest);
		mapSet = false;
		finalQuestStarted = false;
	}
Beispiel #2
0
        public IItemQuest AddItemQuest(Guid guid, ItemQuestBlueprint blueprint, IContainer container)
        {
            if (blueprint == null)
            {
                throw new ArgumentNullException(nameof(blueprint));
            }
            IItemQuest item = new ItemQuest(guid, blueprint, container);

            _items.Add(item);
            return(item);
        }
 public void Setup()
 {
     questSet [0]      = new Quest();
     questSet [1]      = new ItemQuest(itemquest);
     questSet [2]      = psychoKilling = new PsychopathKillingQuest();
     questSet [3]      = new ItemDeliveryQuest();
     questSet [4]      = new SlaughterQuest();
     finalQuest        = new PsychopathegeneQuest(itemquest);
     mapSet            = false;
     finalQuestStarted = false;
 }
    public void randomItems()
    {
        while (items.Count > 0 && map.Count > 0)
        {
            int randomMap = Random.Range(0, map.Count);

            //Debug.Log("randomMap" + randomMap);
            if (objectiveLocation.ContainsKey(map[randomMap]))
            {
                if (objectiveLocation[map[randomMap]].Count < 2)
                {
                    int       randomItem = Random.Range(0, items.Count);
                    ItemQuest temp       = items[randomItem];
                    for (int i = 0; i < objectiveLocation[map[randomMap]].Count; i++)
                    {
                        if (objectiveLocation[map[randomMap]][i].getPositions() == Spawn.one)
                        {
                            temp.setPositions(Spawn.two);
                            break;
                        }
                    }
                    objectiveLocation[map[randomMap]].Add(temp);
                    map.Remove(randomMap);
                    items.Remove(items[randomItem]);
                }
            }
            else
            {
                int randomItem = Random.Range(0, items.Count);
                objectiveLocation.Add(map[randomMap], new List <ItemQuest>());
                ItemQuest temp = items[randomItem];
                objectiveLocation[map[randomMap]].Add(temp);
                items.Remove(items[randomItem]);
            }
        }

        /*foreach (KeyValuePair<int, List<ItemQuest>> pair in objectiveLocation)
         * {
         *
         *  for (int i = 0; i < pair.Value.Count; i++)
         *  {
         *      Debug.Log(pair.Key + " " + pair.Value[i].getItemID() + " " + pair.Value[i].getPositions());
         *  }
         * }*/
    }
 private void DrawThingProperties(ItemQuest item)
 {
 }
 // 1= true;
 //2 = false;
 public void addItemQuest(ItemQuest item)
 {
     items.Add(item);
 }