Example #1
0
 public virtual void RemovePart(ShellPart part)
 {
     if (part.GetComponent <Ability>())
     {
         part.GetComponent <Ability>().SetDestroyed(true);
     }
     entityBody.mass -= part.partMass;
     weight          -= part.partMass * weightMultiplier;
     if (this as Craft)
     {
         (this as Craft).CalculatePhysicsConstants();
     }
     Domino(part);
     part.Detach();
     parts.Remove(part);
 }
Example #2
0
 public bool IsAdjacent(ShellPart part)
 {
     return(part.GetComponent <SpriteRenderer>().bounds.Intersects(GetComponent <SpriteRenderer>().bounds));
 }