Exemplo n.º 1
0
 void HotspotOn(PlaceTrigger place)
 {
     if (place.namePlace == this.PointName)
     {
         this.CurrentAmount++;
         Completed = true;
         Quest.CheckGoals();
         if (Quest.Completed)
         {
             GameObject.FindObjectOfType <QuestUI>().Goals.Remove(this);
             GameObject.FindObjectOfType <QuestUI>().UpdateUI();
             //c'est bon go dialogue;
             if (OnPlaceCheck != null)
             {
                 OnPlaceCheck(place.namePlace, 1);
             }
         }
         else
         {
             //C'est pas bon
             if (OnPlaceCheck != null)
             {
                 OnPlaceCheck(place.namePlace, 0);
             }
             Completed = false;
         }
     }
 }
Exemplo n.º 2
0
    // Start is called before the first frame update
    void Start()
    {
        if (placeTrigger == null)
        {
            placeTrigger = GetComponent <PlaceTrigger>();
        }

        placeTrigger.OnTriggerEnter_Custom += SetCanInteractTrue;
        placeTrigger.OnTriggerExit_Custom  += SetCanInteractFalse;
    }