private void CompleteRepair() { //hole.SetActive(false); HoleRadius radius = hole.GetComponent <HoleRadius>(); radius.holeStates = HoleRadius.HoleStates.Repaired; transform.parent = null; playerStates.itemHeld = null; playerStates.playerState = PlayerStates.PlayerState.pEmpty; woodStates.currentState = WoodStates.WoodState.Dropped; playerController.currentObject = null; gameObject.SetActive(false); }
private void OnTriggerEnter(Collider other) { if (other.CompareTag("Player")) { Debug.Log("Hit the player! Ignore!"); return; } Debug.Log("Triggered!"); if (other.CompareTag("Hole")) { Debug.Log("Dropball hit a hole!"); HoleRadius hole = other.GetComponent <HoleRadius>(); if (hole != null && hole.holeStates == HoleRadius.HoleStates.Dormant) { Debug.Log("Reopened a hole!"); hole.ReopenHole(); } } }