Пример #1
0
    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;
        }
    }
Пример #2
0
    // 1
    public void OnTriggerEnter(Collider other)
    {
        SetCollidingObject(other);
        // Debug.Log("get");

        if (other.tag == "Trap")
        {
            if (Controller.GetHairTriggerDown())
            {
                LevelOne.GetIns().wolfSaved = true;
            }
        }
    }