Esempio n. 1
0
 public void SetMailbox(MaterialType type)
 {
     for (int i = 0; i < mailboxes.Length; i++)
     {
         mailboxes[i].gameObject.SetActive(i == (int)type);
     }
     currentMailbox = mailboxes[(int)type];
     animator       = currentMailbox.GetComponent <Animator>();
     audioSource    = currentMailbox.GetComponent <AudioSource>();
     letterRoot.transform.SetParent(currentMailbox.transform);
     animator.SetBool("IsFull", letters.Count > 0);
     animator.SetBool("IsOpen", IsOpen);
     if (letters.Count > 0)
     {
         TurnOnHelp();
     }
 }