Ejemplo n.º 1
0
        /// <summary>
        /// Sets the particles properties to their default values.
        /// </summary>
        public void Initialize()
        {
            m_x               = 0;
            m_y               = 0;
            m_previousX       = 0;
            m_previousY       = 0;
            m_targetX         = 0;
            m_targetY         = 0;
            m_velocityX       = 0;
            m_velocityY       = 0;
            m_rotation        = 0;
            m_angularVelocity = 0;
            m_color           = Color4bs.White;
            m_scale           = 1;
            m_lifetime        = 0;
            m_age             = 0;
            m_energy          = 1;
            m_isDead          = false;

            if (m_imageData != null)
            {
                m_imageData.Dispose();
                m_imageData = null;
            }
        }
Ejemplo n.º 2
0
        protected virtual void Dispose(bool disposing)
        {
            if (!disposing)
            {
                return;
            }

            if (_imageData == null)
            {
                return;
            }

            _imageData.Dispose();
            _imageData = null;
        }