Exemple #1
0
        private PassiveNPC FindPassiveByID(int id)
        {
            List <PassiveNPC> pTypes = PassiveTypes;
            PassiveNPC        p      = pTypes.Find(x => x.ID == id);

            return(p);
        }
Exemple #2
0
        public void CreateListsOfNPCs()
        {
            bool isMerchantSpawning = ShouldMerchantSpawn();

            if (isMerchantSpawning == true)
            {
                PassiveNPC merchant = FindPassiveByID(0);
                PassiveNPC p        = new PassiveNPC(merchant.ID, merchant.Name, merchant.LocationID, merchant.TilePosition, merchant.Icon, merchant.RoleDescriptor);
                PassiveNPCs.Add(p);
                Gamestate.TimeSinceMerchantSpawn = 0;
                GivePassivesPositions();
            }

            int enemyCount = NumberOfEnemiesToSpawn();

            EnemyNPCs = GetEnemiesForList(enemyCount);
            GiveEnemiesPositions();
        }