/// <summary>
 /// Activate menu by key
 /// </summary>
 /// <param name="key"></param>
 public void SpawnMenu(string key)
 {
     if (_menus.TryGetValue(key, out _menu))
     {
         _menu.Fade(1.0f, 0.1f, false);
     }
 }
Exemple #2
0
        // Use this for initialization
        private void Awake()
        {
            uICanvasContainer = new UICanvasContainer(gameObject.GetComponent <CanvasGroup>(),
                                                      gameObject.GetComponent <CanvasGroupController>());

            uICanvasContainer.Fade(0.0f, 1.0f, false);
        }
Exemple #3
0
        // Use this for initialization
        private void Start()
        {
            _uiCanvasContainer = new UICanvasContainer(gameObject.GetComponent <CanvasGroup>(),
                                                       gameObject.GetComponent <CanvasGroupController>());

            _uiCanvasContainer.UpdateCanvasGroup(0, true, true); // fast dark in
            // and
            _uiCanvasContainer.Fade(1, 0.05f, false);            // slow dark out
        }
Exemple #4
0
        /// <summary>
        /// Button event. Call right method by TriggerEvent key
        /// </summary>
        /// <param name="key"></param>
        public virtual void OnClosePopup(int key)
        {
            EventManager.TriggerEvent(key);

            uICanvasContainer.Fade(0.0f, 0.1f, false);
        }
 private void Start()
 {
     // start fade out
     _gUIManagerCanvasContainer.Fade(0, 0.05f, false); // fast dark out
 }