public void Test <T>(LeveledPool <T> pool, int max, bool print, ushort forLevel)
    {
        pool.SetFor(forLevel);
        Test(pool, max, print);

        //Can also just ask the list for something relative to level 5
        T item;

        pool.Get(new System.Random(), out item, 5);
    }
Beispiel #2
0
    public NPC SpawnNPC(GridSpace g, GenericFlags <SpawnKeywords> keywords)
    {
        LeveledPool <NPC> pool = GetPool(keywords);
        NPC n;

        if (!pool.Get(Probability.SpawnRand, out n, BigBoss.Player.Level))
        {
            throw new ArgumentException("NPC Pool was empty for keywords: " + keywords);
        }
        return(SpawnNPC(g, n));
    }