Пример #1
0
        /// <summary>
        /// Constructor for Scroller effect
        /// </summary>
        /// <param name="chess">Chessboard</param>
        /// <param name="star">Starfield</param>
        /// <param name="txt">Text printer</param>
        public Scroller(ref Chess chess, ref Starfield star, ref Text2D txt)
        {
            c = chess;
            sf = star;
            text = txt;
            listScrollers = new List<string>();
            indexList = new List<int>();
            maxIndexValue = 0;
            randomBackground = 0;
            randomScrollMove =  0;
            randomFont = 0;
            x = 0.0f;
            y = 0.0f;
            z = 0.0f;
            startY = 0.0f;
            tick = 0;
            LastPlayedDate = string.Empty;

            readFromXml();
            getRandomScrollerStuff();
        }
Пример #2
0
        /// <summary>
        /// Dispose method
        /// </summary>
        /// <param name="disposing">Is it disposing?</param>
        protected virtual void Dispose(bool disposing)
        {
            if (!this.disposed)
            {
                if (disposing)
                {
                    // free managed resources
                    c = null;
                    sf = null;

                }
                // free native resources if there are any.
                Debug.WriteLine(this.GetType().ToString() + " disposed.");
                disposed = true;
            }
        }