示例#1
0
        /// <summary>
        /// Constructs an instance of Completed screen with the set of pictures to put
        /// onto the photographs.
        /// </summary>
        public CompletedScreen(PictureSet pictureSet)
        {
            this.pictureSet = pictureSet;

            Audio.Play("Puzzle Completed");
            photographs = new List <Photograph>();

            int photographCount = 40;

            for (int i = 0; i < photographCount; i++)
            {
                Photograph newphotograph = new Photograph();
                ResetPhotograph(newphotograph);
                photographs.Add(newphotograph);
            }

            TransitionOnTime  = Puzzle3D.TransitionTime;
            TransitionOffTime = TimeSpan.FromSeconds(0.75f);
        }
示例#2
0
 /// <summary>
 ///  Resets a photograph for another fall. Also puts a random picture on it.
 /// </summary>
 /// <param name="photograph">The photograph to reset.</param>
 void ResetPhotograph(Photograph photograph)
 {
     photograph.Texture =
         pictureSet.GetTexture(RandomHelper.Random.Next(pictureSet.Count));
     photograph.Reset();
 }