Пример #1
0
        protected override void BeginRun()
        {
            field = new Field(480, 800);
            field.Spawn(typeof(Player), new Vector2(40, 40), Polarity.Red);
            field.Spawn(typeof(Chaser), new Vector2(80, 40), Polarity.Red);
            field.Spawn(typeof(Smarty), new Vector2(80, 80), Polarity.Blue);
            field.Spawn(typeof(Stander), new Vector2(40, 80), Polarity.Blue);
            field.Spawn(typeof(Rover), new Vector2(80, 80), Polarity.Red);
            field.Spawn(typeof(Dual), new Vector2(160, 160), Polarity.Blue);
            field.Spawn(typeof(Shooter), new Vector2(160, 200), Polarity.Red);
            field.Spawn(typeof(Layer), new Vector2(40, 200), Polarity.Blue);

            base.BeginRun();
        }
Пример #2
0
 public Stander(Field field, Vector2 position, Polarity polarity)
     : base(field, position, polarity)
 {
     direction = 0;
 }
Пример #3
0
 public Layer(Field field, Vector2 position, Polarity polarity)
     : this(field, position, RandomAngle(), polarity)
 {
 }
Пример #4
0
 public Layer(Field field, Vector2 position, float direction, Polarity polarity)
     : base(field, position, direction, polarity)
 {
     minePolarity = polarity;
 }
Пример #5
0
 public Shape(Field field, Vector2 position, Polarity polarity)
 {
     this.field = field;
     this.position = position;
     this.polarity = polarity;
 }
Пример #6
0
 public Shooter(Field field, Vector2 position, Polarity polarity)
     : base(field, position, polarity)
 {
     lastShot = null;
 }
Пример #7
0
 public Smarty(Field field, Vector2 position, Polarity polarity)
     : base(field, position, polarity)
 {
 }
Пример #8
0
 public Chaser(Field field, Vector2 position, Polarity polarity)
     : base(field, position, polarity)
 {
 }
Пример #9
0
 public Rover(Field field, Vector2 position, float direction, Polarity polarity)
     : base(field, position, polarity)
 {
     velocity = VecOps.Polar(.5F, direction);
 }
Пример #10
0
 public Dual(Field field, Vector2 position, Polarity polarity)
     : base(field, position, polarity)
 {
     direction = 0F;
 }