Esempio n. 1
0
 private bool TryTalk()
 {
     foreach (Collider2D hit in GetCollidersFacing())
     {
         Leogan l = hit.GetComponent <Leogan>();
         if (l != null)
         {
             if (heldObject != null)
             {
                 if (heldObject.GetComponent <FlaskContents>().contents == truthPotion)
                 {
                     OnWin.Invoke();
                     OnConvoStarted.Invoke();
                 }
                 if (heldObject.GetComponent <FlaskContents>().contents == antidotePotion)
                 {
                     OnLose.Invoke();
                     OnConvoStarted.Invoke();
                 }
             }
             else
             {
                 OnConvoStarted.Invoke();
             }
             return(true);
         }
     }
     return(false);
 }
Esempio n. 2
0
 private IEnumerator FlaskToCauldron(Cauldron cauldron, CarryEnabler c)
 {
     cauldron.TakePotion(c.GetComponent <FlaskContents>());
     Destroy(c.gameObject);
     yield break;
 }