Exemple #1
0
 /// <summary>
 ///     Show the demo timer
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void demoTimerToolStripMenuItem_Click(object sender, EventArgs e)
 {
     using (var dtf = new DemoTimer())
     {
         dtf.ShowDialog(this);
     }
 }
    private void Start()
    {
        Instance = this;
        if (GenericGameSettings.instance != null)
        {
            if (GenericGameSettings.instance.demoMode)
            {
                duration = (float)GenericGameSettings.instance.demoTime;
                labelText.gameObject.SetActive(GenericGameSettings.instance.showDemoTimer);
                clockImage.gameObject.SetActive(GenericGameSettings.instance.showDemoTimer);
            }
            else
            {
                base.gameObject.SetActive(false);
            }
        }
        else
        {
            base.gameObject.SetActive(false);
        }
        duration      = (float)GenericGameSettings.instance.demoTime;
        fadeOutScreen = Util.KInstantiateUI(Prefab_FadeOutScreen, GameScreenManager.Instance.ssOverlayCanvas.gameObject, false);
        Image component = fadeOutScreen.GetComponent <Image>();

        component.raycastTarget = false;
        fadeOutColor            = component.color;
        fadeOutColor.a          = 0f;
        fadeOutScreen.GetComponent <Image>().color = fadeOutColor;
    }
Exemple #3
0
 /// <summary>
 /// Handles the Click event of the button_demo control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
 private void button_demo_Click(object sender, EventArgs e)
 {
     if (sender != null)
     {
         if (this.button_demo.Text == "Demo Mode")
         {
             this.button_demo.Text = "Stop Demo";
             DemoTimer.Interval    = 100;
             DemoTimer.Start();
         }
         else
         {
             DemoTimer.Stop();
             this.button_demo.Text = "Demo Mode";
         }
     }
 }
 public static void DestroyInstance()
 {
     Instance = null;
 }