예제 #1
0
 void Start()
 {
     mouseInfoMessage  = GameObject.FindGameObjectWithTag("_MouseInfoMessage").GetComponent <MouseInfoMessage>();
     notification      = GameObject.FindGameObjectWithTag("_Notification").GetComponent <NotificationScript>();
     currentActionInfo = GameObject.FindGameObjectWithTag("Respawn").GetComponent <CurrentActionInfo>();
     selection         = GameObject.FindGameObjectWithTag("_CurrentActionInfo").GetComponent <Selection>();
 }
예제 #2
0
 // Token: 0x06001894 RID: 6292 RVA: 0x000E1DE4 File Offset: 0x000DFFE4
 public void DisplayNotification(NotificationType Type)
 {
     if (!this.Yandere.Egg)
     {
         GameObject         gameObject = UnityEngine.Object.Instantiate <GameObject>(this.Notification);
         NotificationScript component  = gameObject.GetComponent <NotificationScript>();
         gameObject.transform.parent           = this.NotificationParent;
         gameObject.transform.localPosition    = new Vector3(0f, 0.60275f + 0.049f * (float)this.NotificationsSpawned, 0f);
         gameObject.transform.localEulerAngles = Vector3.zero;
         component.NotificationManager         = this;
         string text;
         this.NotificationMessages.TryGetValue(Type, out text);
         if (Type != NotificationType.Persona && Type != NotificationType.Custom)
         {
             string str = "";
             if (Type == NotificationType.Topic || Type == NotificationType.Opinion)
             {
                 str = this.TopicName;
             }
             component.Label.text = text + str;
         }
         else if (Type == NotificationType.Custom)
         {
             component.Label.text = this.CustomText;
         }
         else
         {
             component.Label.text = this.PersonaName + " " + text;
         }
         this.NotificationsSpawned++;
         component.ID      = this.NotificationsSpawned;
         this.PreviousText = this.CustomText;
     }
 }
    private void Lerp()
    {
        float distanceToCover = 1.1f * width;

        if (direction == Direction.kIn)
        {
            transform.localPosition += new Vector3(distanceToCover * Time.deltaTime * Speed, 0, 0);

            if (transform.localPosition.x >= resetPosition.x + distanceToCover)
            {
                direction = Direction.kStopped;
            }
        }
        else if (direction == Direction.kOut)
        {
            transform.localPosition -= new Vector3(distanceToCover * Time.deltaTime * Speed, 0, 0);

            if (transform.localPosition.x <= resetPosition.x)
            {
                direction = Direction.kStopped;
                transform.localPosition = resetPosition;
                currentNotification     = null;
            }
        }
    }
 // Token: 0x06000600 RID: 1536 RVA: 0x00054E60 File Offset: 0x00053260
 public void DisplayNotification(NotificationType Type)
 {
     if (!this.Yandere.Egg)
     {
         GameObject         gameObject = UnityEngine.Object.Instantiate <GameObject>(this.Notification);
         NotificationScript component  = gameObject.GetComponent <NotificationScript>();
         gameObject.transform.parent           = this.NotificationParent;
         gameObject.transform.localPosition    = new Vector3(0f, 0.60275f + 0.049f * (float)this.NotificationsSpawned, 0f);
         gameObject.transform.localEulerAngles = Vector3.zero;
         component.NotificationManager         = this;
         string text;
         bool   flag = this.NotificationMessages.TryGetValue(Type, out text);
         component.Label.text = text;
         this.NotificationsSpawned++;
         component.ID = this.NotificationsSpawned;
     }
 }
    private void ShowEvent()
    {
        if (currentNotification == null && notifications.Count > 0)
        {
            currentNotification = notifications.Dequeue();
            title.text          = currentNotification.Title;
            description.text    = currentNotification.Description;
            currentNotification.Show();
            direction    = Direction.kIn;
            timeShownFor = 0;

            if (!string.IsNullOrEmpty(currentNotification.OnShowAudioClip))
            {
                audioSource.clip = Resources.Load <AudioClip>(currentNotification.OnShowAudioClip);
                audioSource.Play();
            }
        }
    }
 public void QueueNotification(NotificationScript notification)
 {
     notifications.Enqueue(notification);
 }
예제 #7
0
 void Awake()
 {
     notification = GameObject.Find("Notification").GetComponent <NotificationScript>();
 }