Пример #1
0
        /// <summary>
        /// Spawns monsters from internal list.
        /// </summary>
        public void Spawn()
        {
            var rnd = RandomProvider.Get();

            var region   = this.Puzzle.Region;
            var worldPos = this.Place.GetWorldPosition();

            foreach (var monster in _monsters)
            {
                var pos = this.Place.GetPosition(_spawnPosition);
                monster.Direction = MabiMath.DegreeToByte(pos[2]);
                monster.Spawn(region.Id, pos[0], pos[1]);

                if (monster.AI != null)
                {
                    monster.AI.Activate(1000);
                }
            }
        }