示例#1
0
 private Rigidbody GetRigidbody(ActionEvent ae)
 {
     Rigidbody r;
     if (previousObjects.TryGetValue(ae, out r))
         return r;
     else
     {
         r = ae.GetComponent<Rigidbody>();
         if (r == null)
             Debug.LogError("This object '" + ae.gameObject.name + "' doesn't have a Rigidbody!");
         previousObjects.Add(ae, r);
         return r;
     }
 }