Beispiel #1
0
        public void SpawnX(Vector3 o, int n)
        {
            for (int i = 0; i < n; i++)
            {
                if (!this.fragments.HasAvailable())
                {
                    this.fragments.Dispose(this.fragments.GetFirst());
                }

                DropFragment b = this.fragments.Provide();
                b.Construct(o);
            }
        }
Beispiel #2
0
        /// <summary>
        /// Update all of the bullets held in the list.
        /// Add the ones that are still alive to a new list.
        /// </summary>
        /// <param name="ms">Milliseconds passed since last update</param>
        public void Update(float ms)
        {
            int i = fragments.GetFirst();

            while (i != -1)
            {
                DropFragment b = this.fragments.GetByIndex(i);
                b.Update(ms);
                if (b.mustBeDeleted)
                {
                    this.fragments.Dispose(b);
                }
                i = this.fragments.NextIndex(b);
            }
        }