Skip to content
Snippets Groups Projects
TalkingButton_mobile.cs 1.1 KiB
Newer Older
  • Learn to ignore specific revisions
  • using UnityEngine;
    //using static StreamingAssetLoader;
    //using static CheckServer;
    //using static CommunicationEvents;
    
    
    public class TalkingButton_mobile : MonoBehaviour
    {
    
        public GameObject myself_GObj;
    
    
        void Start()
        {
            
        }
    
        private void Update()
        {
            if (UIconfig.numberOfTalkingTargets > 0)
            {
                ActivateUIC();
            }
            else
            {
                ClearUIC();
            
            }
            UIconfig.numberOfTalkingTargets = 0;
        }
    
    
        public void Talk_Bttn()
        {
            UIconfig.nextDialogPlease++;
        }
    
        /// <summary>
        /// Deactivates all Pages.
        /// </summary>
        private void ActivateUIC()
        {
    
            for (int i = 0; i < myself_GObj.transform.childCount; i++)
            {
                myself_GObj.transform.GetChild(i).gameObject.SetActive(true);
            }
        }
    
    
        /// <summary>
        /// Deactivates all Pages.
        /// </summary>
        private void ClearUIC()
        {
    
            for (int i = 0; i < myself_GObj.transform.childCount; i++)
            {
                myself_GObj.transform.GetChild(i).gameObject.SetActive(false);
            }
        }
    
    
    }