Ejemplo n.º 1
0
 // Token: 0x0600059B RID: 1435 RVA: 0x0002FD90 File Offset: 0x0002DF90
 private void UpdateUnlockMsg(float dt)
 {
     for (int i = 0; i < this.m_unlockMessages.Count; i++)
     {
         GameObject gameObject = this.m_unlockMessages[i];
         if (!(gameObject == null) && gameObject.GetComponentInChildren <Animator>().GetCurrentAnimatorStateInfo(0).IsTag("done"))
         {
             UnityEngine.Object.Destroy(gameObject);
             this.m_unlockMessages[i] = null;
             break;
         }
     }
     if (this.m_unlockMsgQueue.Count > 0)
     {
         int freeUnlockMsgSlot = this.GetFreeUnlockMsgSlot();
         if (freeUnlockMsgSlot != -1)
         {
             Transform  transform   = base.transform;
             GameObject gameObject2 = UnityEngine.Object.Instantiate <GameObject>(this.m_unlockMsgPrefab, transform);
             this.m_unlockMessages[freeUnlockMsgSlot] = gameObject2;
             RectTransform rectTransform = gameObject2.transform as RectTransform;
             Vector3       v             = rectTransform.anchoredPosition;
             v.y -= (float)(this.m_maxUnlockMsgSpace * freeUnlockMsgSlot);
             rectTransform.anchoredPosition = v;
             MessageHud.UnlockMsg unlockMsg = this.m_unlockMsgQueue.Dequeue();
             Image component  = rectTransform.Find("UnlockMessage/icon_bkg/UnlockIcon").GetComponent <Image>();
             Text  component2 = rectTransform.Find("UnlockMessage/UnlockTitle").GetComponent <Text>();
             Text  component3 = rectTransform.Find("UnlockMessage/UnlockDescription").GetComponent <Text>();
             component.sprite = unlockMsg.m_icon;
             component2.text  = unlockMsg.m_topic;
             component3.text  = unlockMsg.m_description;
         }
     }
 }
Ejemplo n.º 2
0
 // Token: 0x06000599 RID: 1433 RVA: 0x0002FCE4 File Offset: 0x0002DEE4
 public void QueueUnlockMsg(Sprite icon, string topic, string description)
 {
     MessageHud.UnlockMsg unlockMsg = new MessageHud.UnlockMsg();
     unlockMsg.m_icon        = icon;
     unlockMsg.m_topic       = Localization.instance.Localize(topic);
     unlockMsg.m_description = Localization.instance.Localize(description);
     this.m_unlockMsgQueue.Enqueue(unlockMsg);
     this.AddLog(topic + ":" + description);
     ZLog.Log("Queue unlock msg:" + topic + ":" + description);
 }