Esempio n. 1
0
 public FieldLogic(GameWindow window, FieldRenderer field, CoordinatedInputManager.PlayerNumber player)
     : base(window)
 {
     this.field = field;
       this.manager = new TetraminoManager();
       this.dropTimer = dropSpeed;
       this.rand = new RandomGenerator();
       this.player = player;
       this.leftDAR = this.rightDAR = this.initialDAR;
 }
 public InterleavedFieldManager(GameWindow window, NumPlayers players)
     : base(window)
 {
     this.players = players;
       this.logic = new FieldLogic[(int)players];
       this.renderer = new FieldRenderer[(int)players];
       for (int i = 0; i < (int)players; i++)
       {
     this.logic[i] = new FieldLogic(window, renderer[i] = new FieldRenderer(window, positions[(int)players - 1][i]) { Enabled = true, Visible = players == NumPlayers.OnePlayer }, (CoordinatedInputManager.PlayerNumber)(i + 1)) { Enabled = true, Visible = false };
     this.Components.Add(logic[i]);
     this.Components.Add(renderer[i]);
       }
 }