Beispiel #1
0
        public void SetZone(ZoneDetails zone)
        {
            Sprite sprite = Resources.Load <Sprite>(zone.iconUrl);

            m_title.text   = zone.name;
            m_image.sprite = sprite;
        }
 void OnEnable()
 {
     if (m_curZone != m_zoneMan.CurrentZone)
     {
         m_curZone = m_zoneMan.CurrentZone;
         Texture tex = Resources.Load <Texture>(m_curZone.imageUrl);
         m_zoneTitle.text       = m_curZone.name;
         m_zoneDescription.text = m_curZone.description;
         m_zoneImage.texture    = tex;
     }
 }
        public void SetCurrentZone(Zone zoneId, bool silent = false)
        {
            if (zoneId == m_currentZoneId)
            {
                return;
            }

            m_isInside = (m_isInside && (zoneId == Zone.Estacionamiento || zoneId == Zone.Frente)) ?
                         false : (!m_isInside && zoneId == Zone.Principal);

            Transition?.Invoke(this, m_isInside);
            ZoneChanged?.Invoke(this, zoneId);

            m_currentZone   = zones[(int)zoneId];
            m_currentZoneId = zoneId;
            m_zoneToast.SetZone(m_currentZone);

            if (!m_debouncing && !silent)
            {
                m_debouncing = true;
                StartCoroutine(ShowZoneToast());
            }
        }