Ejemplo n.º 1
0
 public override bool FireEvent(Event E)
 {
     if (E.ID == "ZoneActivated" || E.ID == "ObjectCreated")
     {
         this.MagnetMutation = this.ParentObject.GetPart <MagneticPulse>();
         if (this.MagnetMutation != null)
         {
             this.Depolarize();
         }
     }
     else if (E.ID == "ZoneDeactivated")
     {
         if (this.MagnetMutation != null)
         {
             this.Repolarize();
         }
         this.MagnetMutation = null;
     }
     else if (E.ID == "EndTurn")
     {
         if (this.MagnetMutation == null)
         {
             this.MagnetMutation = this.ParentObject.GetPart <MagneticPulse>();
         }
         if (this.MagnetMutation != null)
         {
             this.Depolarize();
         }
     }
     return(base.FireEvent(E));
 }
Ejemplo n.º 2
0
 public Egcb_Demagnetizer()
 {
     this.MagnetMutation = null;
 }