Server.Mobiles.IntelliSpawner.Respawn C# (CSharp) Méthode

Respawn() public méthode

public Respawn ( ) : void
Résultat void
        public virtual void Respawn()
        {
            RemoveSpawned();

            for (int i = 0; i < m_Count; i++)
                Spawn();
        }

Usage Example

            protected override void OnTick()
            {
                List <Item> spawners = new List <Item>();

                foreach (NetState state in NetState.Instances)
                {
                    if (state.Mobile != null)
                    {
                        foreach (Item item in state.Mobile.GetItemsInRange(100))
                        {
                            if (item is IntelliSpawner)
                            {
                                spawners.Add(item);
                            }
                        }
                    }
                }

                foreach (Item item in spawners)
                {
                    IntelliSpawner spawner = item as IntelliSpawner;

                    if (!spawner.Running)
                    {
                        spawner.Running = true;
                        spawner.Respawn();
                        spawner.DoTimer();
                    }
                }
            }
All Usage Examples Of Server.Mobiles.IntelliSpawner::Respawn