Пример #1
0
        public void Process()
        {
            MapRespawn MR;

            for (int I = 0; I < RespawnList.Count; I++)
            {
                MR = RespawnList[I];

                int SpawnCount = MR.RI.Count - MR.Count;

                if (SpawnCount <= 0)
                {
                    continue;
                }

                if (Main.Time >= MR.NextSpawn)
                {
                    for (int R = 0; R < SpawnCount; R++)
                    {
                        MonsterObject.MakeMonster(MR).TrySpawn();
                    }

                    MR.NextSpawn = Main.Time + (long)MR.RI.Delay.TotalMilliseconds;
                }
            }

            for (int I = Objects.Count - 1; I >= 0; I--)
            {
                if (Objects[I].CanOperate)
                {
                    Objects[I].Process();
                }
            }
        }