Beispiel #1
0
 public void Connect(VirtualMagnetModule module)
 {
     connectedModule = module;
     connectedModule.transform.position = this.transform.position;
     connectedModule.transform.rotation = this.transform.rotation;
     (connectedModule.gameObject.AddComponent(typeof(FixedJoint)) as FixedJoint).connectedBody = parent;
 }
Beispiel #2
0
 public void Disconnect()
 {
     Destroy(connectedModule.GetComponent <FixedJoint>());
     connectedModule = null;
 }