示例#1
0
 void OnCollisionEnter(Collision collision)
 {
     //if (collision.gameObject == raccoon) fragile = true;
     if (ObjectManager.curTool != null)
     {
         df.StartDusting(true);
         SpawnFracturedObj(collision.relativeVelocity * mass);
     }
 }
示例#2
0
    public void trigger(Vector3 pushForce)
    {
        pushForce.y = -Mathf.Abs(pushForce.x);
        rb.AddForceAtPosition(pushForce, collidePoint);

        //Debug.Log("collide at" + collidePoint);
        if (!toppled)
        {
            ScoreManager.instance.AddScore(objName, aType, scorePoint);
            toppled = true;
            TaskManager.instance.UpdateProgress(gameObject);
            df.StartDusting(false);
        }
    }