//this triggers the actual engame detection
 protected virtual void OnEndGameTimer()
 {
     if (_EndGameTimer != null)
     {
         _EndGameTimer.Stop();
         _EndGameTimer = null;
     }
 }
Пример #2
0
        protected void StartEndGameTimer(TimeSpan delay)
        {
            if (_EndGameTimer != null)
            {
                _EndGameTimer.Stop();

                _EndGameTimer = null;
            }

            _EndGameTimer = new EndGameTimer(this, delay);
            _EndGameTimer.Start();
        }
        protected void StartEndGameTimer(TimeSpan delay)
        {
            //Console.WriteLine( "Starting Endgame timer" );
            if (_EndGameTimer != null)
            {
                _EndGameTimer.Stop();

                _EndGameTimer = null;
            }

            _EndGameTimer = new EndGameTimer(this, delay);
            _EndGameTimer.Start();
        }
        public override void Delete()
        {
            if (_WinnerTimer != null)
            {
                _WinnerTimer.Stop();
                _WinnerTimer = null;
            }
            if (_EndGameTimer != null)
            {
                _EndGameTimer.Stop();
                _EndGameTimer = null;
            }

            base.Delete();
        }
Пример #5
0
	// Update is called once per frame
	void Update () {
		if (!ready && GameObject.FindGameObjectWithTag ("EndGameTimer") != null) {
			timer = GameObject.FindGameObjectWithTag ("EndGameTimer").GetComponent<EndGameTimer>();
			myText.text = timer.maxTime.ToString ();
			ready = true;
		}
		if (ready) {
			if (timer.TimeLeft() > 0) {
				float myFloat = Mathf.Round (timer.TimeLeft () * 10f) / 10f;
				if (myFloat % 1 == 0) {
					myText.text = myFloat.ToString () + ".0";
				} else {
					myText.text = myFloat.ToString ();
				}
			}
		}
	}
		public override void Delete()
		{
			if( _WinnerTimer != null )
			{
				_WinnerTimer.Stop();
				_WinnerTimer = null;
			}
			if( _EndGameTimer != null )
			{
				_EndGameTimer.Stop();
				_EndGameTimer = null;
			}
			
			base.Delete();
		}
		//this triggers the actual engame detection
		protected virtual void OnEndGameTimer()
		{
			if( _EndGameTimer != null )
			{
				_EndGameTimer.Stop();
				_EndGameTimer = null;
			}
		}
		protected void StartEndGameTimer( TimeSpan delay )
		{
			//Console.WriteLine( "Starting Endgame timer" );
			if( _EndGameTimer != null )
			{
				_EndGameTimer.Stop();
				
				_EndGameTimer = null;
			}
			
			_EndGameTimer = new EndGameTimer( this, delay );
			_EndGameTimer.Start();
		}
Пример #9
0
 void Start()
 {
     getTimer = manager.GetComponent<EndGameTimer>();
 }
        protected void StartEndGameTimer( TimeSpan delay )
        {
            if( _EndGameTimer != null )
            {
                _EndGameTimer.Stop();

                _EndGameTimer = null;
            }

            _EndGameTimer = new EndGameTimer( this, delay );
            _EndGameTimer.Start();
        }