public void Capture(ICrateSnapper dad, ResourceComponent res) { if (CanSnap(res)) { res.SnapCrate(dad, this.allocateCrate(res)); parent.AddToGlobalList(res); } }
public void SnapCrate(ICrateSnapper snapParent, Vector3 snapPosition, Rigidbody jointRigid = null, Quaternion?globalRotation = null) { this.SnappedTo = snapParent; this.SnapCrate(snapParent.transform, snapPosition, jointRigid, globalRotation); }