public void OnCollisionEnter(Collision collision) { Collider other = collision.collider; if (other.GetComponentInParent <WolfController>() && LevelOne.GetIns().wolfSaved&& collision.relativeVelocity.magnitude > minVelAttack) { Debug.Log("Attcked"); other.GetComponentInParent <WolfController>().Stun = true; attackedTime = Time.time; attacked = true; } }
// 1 public void OnTriggerEnter(Collider other) { SetCollidingObject(other); // Debug.Log("get"); if (other.tag == "Trap") { if (Controller.GetHairTriggerDown()) { LevelOne.GetIns().wolfSaved = true; } } }