Пример #1
0
		// ================================================================================
		//  unity methods
		// --------------------------------------------------------------------------------

		public void Awake()
		{
			_timer = new FadingTimer(0.4f, displayDuration, 0.4f);
			_timer.Stop();

			if (_text == null || _text.Length == 0)
			{
				_text = GetComponentsInChildren<Text>();
			}

			if (_text == null || _text.Length == 0)
			{
				// the MessengerText Object will be inside the MainCanvas
				var messengerObject = GameObject.Find("MessengerText") as GameObject;
				if (messengerObject != null)
					_text = messengerObject.GetComponentsInChildren<Text>();
			}

			if (_text != null)
			{
				for (int i = 0; i < _text.Length; i++)
				{
					_text[i].enabled = false;
				}
			}
		}
Пример #2
0
        // ================================================================================
        //  unity methods
        // --------------------------------------------------------------------------------

        public void Awake()
        {
            _timer = new FadingTimer(0.4f, displayDuration, 0.4f);
            _timer.Stop();

            if (_text == null || _text.Length == 0)
            {
                _text = GetComponentsInChildren <Text>();
            }

            if (_text == null || _text.Length == 0)
            {
                // the MessengerText Object will be inside the MainCanvas
                var messengerObject = GameObject.Find("MessengerText") as GameObject;
                if (messengerObject != null)
                {
                    _text = messengerObject.GetComponentsInChildren <Text>();
                }
            }

            if (_text != null)
            {
                for (int i = 0; i < _text.Length; i++)
                {
                    _text[i].enabled = false;
                }
            }
        }
Пример #3
0
 public void OnLevelWasLoaded(int levelIndex)
 {
     _timer.Stop();
     UpdateColor();
 }