Exemplo n.º 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);
 }
Exemplo n.º 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);
 }
Exemplo n.º 3
0
 public Stander(Field field, Vector2 position, Polarity polarity)
     : base(field, position, polarity)
 {
     direction = 0;
 }
Exemplo n.º 4
0
 public Layer(Field field, Vector2 position, Polarity polarity)
     : this(field, position, RandomAngle(), polarity)
 {
 }
Exemplo n.º 5
0
 public Layer(Field field, Vector2 position, float direction, Polarity polarity)
     : base(field, position, direction, polarity)
 {
     minePolarity = polarity;
 }
Exemplo n.º 6
0
 public Shape(Field field, Vector2 position, Polarity polarity)
 {
     this.field = field;
     this.position = position;
     this.polarity = polarity;
 }
Exemplo n.º 7
0
 public Shooter(Field field, Vector2 position, Polarity polarity)
     : base(field, position, polarity)
 {
     lastShot = null;
 }
Exemplo n.º 8
0
 public Chaser(Field field, Vector2 position, Polarity polarity)
     : base(field, position, polarity)
 {
 }
Exemplo n.º 9
0
 public Smarty(Field field, Vector2 position, Polarity polarity)
     : base(field, position, polarity)
 {
 }
Exemplo n.º 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;
     }
 }
Exemplo n.º 11
0
 public Rover(Field field, Vector2 position, float direction, Polarity polarity)
     : base(field, position, polarity)
 {
     velocity = VecOps.Polar(.5F, direction);
 }
Exemplo n.º 12
0
 public void Spawn(Vector2 position, Polarity polarity, float direction)
 {
     Spawn(new Rover(this, position, direction, polarity));
 }
Exemplo n.º 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 }));
 }
Exemplo n.º 14
0
 public Dual(Field field, Vector2 position, Polarity polarity)
     : base(field, position, polarity)
 {
     direction = 0F;
 }