Example #1
0
 public bool HasPolaritiesLackedBy(Polarity other)
 {
     //if (!other.red && this.red) return true;
     //if (!other.blue && this.blue) return true;
     //return false;
     return (!other.red && this.red) || (!other.blue && this.blue);
 }
Example #2
0
 public bool HasAllPolaritiesOf(Polarity other)
 {
     //if (other.red && !this.red) return false;
     //if (other.blue && !this.blue) return false;
     //return true;
     return !(other.red && !this.red) && !(other.blue && !this.blue);
 }
Example #3
0
 public Stander(Field field, Vector2 position, Polarity polarity)
     : base(field, position, polarity)
 {
     direction = 0;
 }
Example #4
0
 public Layer(Field field, Vector2 position, Polarity polarity)
     : this(field, position, RandomAngle(), polarity)
 {
 }
Example #5
0
 public Layer(Field field, Vector2 position, float direction, Polarity polarity)
     : base(field, position, direction, polarity)
 {
     minePolarity = polarity;
 }
Example #6
0
 public Shape(Field field, Vector2 position, Polarity polarity)
 {
     this.field = field;
     this.position = position;
     this.polarity = polarity;
 }
Example #7
0
 public Shooter(Field field, Vector2 position, Polarity polarity)
     : base(field, position, polarity)
 {
     lastShot = null;
 }
Example #8
0
 public Chaser(Field field, Vector2 position, Polarity polarity)
     : base(field, position, polarity)
 {
 }
Example #9
0
 public Smarty(Field field, Vector2 position, Polarity polarity)
     : base(field, position, polarity)
 {
 }
Example #10
0
 private Color PolarityColor(Polarity pol)
 {
     if (pol.red)
     {
         if (pol.blue) return Color.Purple;
         else return Color.Red;
     }
     else
     {
         if (pol.blue) return Color.Blue;
         else return Color.White;
     }
 }
Example #11
0
 public Rover(Field field, Vector2 position, float direction, Polarity polarity)
     : base(field, position, polarity)
 {
     velocity = VecOps.Polar(.5F, direction);
 }
Example #12
0
 public void Spawn(Vector2 position, Polarity polarity, float direction)
 {
     Spawn(new Rover(this, position, direction, polarity));
 }
Example #13
0
 public void Spawn(Type enemy, Vector2 position, Polarity polarity)
 {
     Spawn((Shape)enemy.GetConstructor(new Type[] { typeof(Field), typeof(Vector2), typeof(Polarity) }).Invoke(
         new object[] { this, position, polarity }));
 }
Example #14
0
 public Dual(Field field, Vector2 position, Polarity polarity)
     : base(field, position, polarity)
 {
     direction = 0F;
 }