Пример #1
0
 public void Reset(MyPirateAntennaDefinition antennaDef)
 {
     AntennaDefinition = antennaDef;
     LastGenerationGameTime = MySandboxGame.TotalGamePlayTimeInMilliseconds + (int)antennaDef.FirstSpawnTimeMs - (int)antennaDef.SpawnTimeMs;
     SpawnedDrones = 0;
     IsActive = false;
 }
Пример #2
0
            public static PirateAntennaInfo Allocate(MyPirateAntennaDefinition antennaDef)
            {
                PirateAntennaInfo info = null;
                if (m_pool.Count == 0)
                {
                    info = new PirateAntennaInfo();
                }
                else
                {
                    info = m_pool[m_pool.Count - 1];
                    m_pool.RemoveAt(m_pool.Count - 1);
                }

                info.Reset(antennaDef);
                return info;
            }