Esempio n. 1
0
 private void OnTriggerStay(Collider other)
 {
     if (cooldownTimer <= 0.0f && ((other.tag == "Girl" && Input.GetButton("Fire1")) || (other.tag == "Boi" && Input.GetButton("Fire2"))))
     {
         Hide hide = other.gameObject.GetComponent <Hide>();
         if (hide.IsObjectHidden())
         {
             isFree = true;
             hide.UnhideObject();
             ResetTimer();
         }
         else if (isFree)
         {
             isFree = false;
             hide.HideObject();
             ResetTimer();
         }
     }
 }