コード例 #1
0
        /// <summary>
        /// Add a batch of entities to be spawned by the spawner.
        /// Entities will be spawned in the order that they are added to the spawner,
        /// with the first entries being spawned first.
        /// </summary>
        /// <param name="GameEntityType">The type of GameEntity to spawn.</param>
        /// <param name="count">The number of entities to spawn.</param>
        /// <param name="spawnDelay">How long to wait until spawning the next batch.</param>
        public void AddGameEntityBatch(GameEntity GameEntityType, int GameEntityCount, int spawnDelay)
        {
            GameEntityBatch newBatch = new GameEntityBatch(GameEntityType, GameEntityCount, spawnDelay);
            this.spawnBatches.Add(newBatch);

            this.Activate();
        }
コード例 #2
0
        public void AddGameEntityBatch(string entityName, int GameEntityCount, int spawnDelay, ArtificialIntelligence sourceAI)
        {
            GameEntityBatch newBatch = new GameEntityBatch(entityName, GameEntityCount, spawnDelay, sourceAI);
            this.spawnBatches.Add(newBatch);

            this.Activate();
        }