public void DeattachFromBody(bool reset, float cooldown = 0)
 {
     foreach (Joint joint in AttachJoints)
     {
         GameMain.World.Remove(joint);
     }
     AttachJoints.Clear();
     if (cooldown > 0)
     {
         attachCooldown = cooldown;
     }
     if (reset)
     {
         Reset();
     }
 }
Example #2
0
 public void DeattachFromBody(bool reset, float cooldown = 0)
 {
     foreach (Joint joint in AttachJoints)
     {
         GameMain.World.Remove(joint);
     }
     AttachJoints.Clear();
     if (cooldown > 0)
     {
         attachCooldown = cooldown;
     }
     if (reset)
     {
         Reset();
     }
     if (targetCharacter != null)
     {
         targetCharacter.Latchers.Remove(this);
     }
 }