Esempio n. 1
0
 public void CancelInteraction()
 {
     if (currentInteractionGameObj)
     {
         currentInteractionGameObj.StopInteraction();
     }
     interactionInProgress     = false;
     currentInteractionGameObj = null;
     //print("INTERACTION CANCELLED");
 }
Esempio n. 2
0
    void StartInteraction()
    {
        GameObject newInteractiveGameObject = FindClosestObjectWithTag("interactiveEnvironment", needsToFaceObject);

        if (Vector3.Distance(transform.position, newInteractiveGameObject.transform.position) < minimumDistance)
        {
            interactionInProgress     = true;
            currentInteractionGameObj = newInteractiveGameObject.GetComponent <InteractiveEnvironmentObj>();
            //print("INTERACTION STARTED");
        }
    }
Esempio n. 3
0
 void CompleteInteraction()
 {
     if (currentInteractionGameObj)
     {
         currentInteractionGameObj.StopInteraction();
     }
     interactionInProgress     = false;
     currentInteractionGameObj = null;
     GameManager.Instance.IncreaseForestHealth(1);
     //print("INTERACTION COMPLETE!");
 }