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