Exemple #1
0
 /// <summary>
 /// Suspends the snow falling.
 /// </summary>
 public void AllOfTheSnowIsNowBlackSlushPlsSuspendIt()
 {
     lock (this)
     {
         if (State == SnowyStates.Flurries)
         {
             _mFlaker.Stop();
             ToggleGravity(false);
             State = SnowyStates.SuspendedFlakes;
         }
     }
 }
Exemple #2
0
        /// <summary>
        /// Called to make it snow.
        /// </summary>
        public void MakeItSnow()
        {
            lock (this)
            {
                if (State != SnowyStates.ClearSkys)
                {
                    return;
                }

                // Set the state
                State = SnowyStates.Flurries;
            }

            // Start the snow!
            _mFlaker.Start();
        }
Exemple #3
0
        /// <summary>
        /// Resumes the snow fall if it was started.
        /// </summary>
        public void OkNowIWantMoreSnowIfItHasBeenStarted()
        {
            lock (this)
            {
                if (State == SnowyStates.SuspendedFlakes)
                {
                    ToggleGravity(true);

                    // If we don't have enough completes resume the flaker.
                    if (_mCompletedStories < CMinCompletedStories)
                    {
                        _mFlaker.Start();
                    }

                    State = SnowyStates.Flurries;
                }
            }
        }
Exemple #4
0
        public LetItSnow()
        {
            InitializeComponent();

            // Setup Random
            _mRandom = new Random((int)DateTime.Now.Ticks);

            // Setup the timer that will spawn our snow
            _mFlaker.Tick    += SnowStarter_Tick;
            _mFlaker.Interval = new TimeSpan(0, 0, 0, 0, 0);

            // Set our state
            State = SnowyStates.ClearSkys;

            // Set the initial size
            _mLandSize = new Size(ActualWidth, ActualHeight);

            // If we are a phone offset by 40 so we also overlap the status bar, it looks a lot better.
            if (AnalyticsInfo.VersionInfo.DeviceFamily.Equals("Windows.Mobile"))
            {
                _mStatusBarOffset = 40;
            }
        }
Exemple #5
0
        public LetItSnow()
        {
            this.InitializeComponent();

            // Setup Random
            m_random = new Random((int)DateTime.Now.Ticks);

            // Setup the timer that will spawn our snow
            m_flaker.Tick += SnowStarter_Tick;
            m_flaker.Interval = new TimeSpan(0, 0, 0, 0, 0);

            // Set our state
            State = SnowyStates.ClearSkys;

            // Set the initial size
            m_landSize = new Size(this.ActualWidth, this.ActualHeight);

            // If we are a phone offset by 40 so we also overlap the status bar, it looks a lot better.
            if(AnalyticsInfo.VersionInfo.DeviceFamily.Equals("Windows.Mobile"))
            {
                m_statusBarOffset = 40;
            }
        }
Exemple #6
0
        /// <summary>
        /// Resumes the snow fall if it was started.
        /// </summary>
        public void OkNowIWantMoreSnowIfItHasBeenStarted()
        {
            lock (this)
            {
                if (State == SnowyStates.SuspendedFlakes)
                {
                    ToggleGravity(true);

                    // If we don't have enough completes resume the flaker.
                    if (m_completedStories < c_minCompletedStories)
                    {
                        m_flaker.Start();
                    }

                    State = SnowyStates.Flurries;
                }
            }
        }
Exemple #7
0
 /// <summary>
 /// Suspends the snow falling.
 /// </summary>
 public void AllOfTheSnowIsNowBlackSlushPlsSuspendIt()
 {
     lock (this)
     {
         if (State == SnowyStates.Flurries)
         {
             m_flaker.Stop();
             ToggleGravity(false);
             State = SnowyStates.SuspendedFlakes;
         }
     }
 }
Exemple #8
0
        /// <summary>
        /// Called to make it snow.
        /// </summary>
        public void MakeItSnow()
        {
            lock(this)
            {
                if(State != SnowyStates.ClearSkys)
                {
                    return;
                }

                // Set the state
                State = SnowyStates.Flurries;
            }

            // Start the snow!
            m_flaker.Start();
        }