示例#1
0
 private void button1_Click(object sender, EventArgs e)
 {
     if ((pseudoBox.Text != string.Empty) && (modeBox.Text != string.Empty) && (shipBox.Text != string.Empty))
     {
         this.pseudo = pseudoBox.Text;
         GameMode      mode = modeArray[(int)Enum.Parse(typeof(modeEnum), this.modeBox.Text)];
         ShipArguments ship = shipArray[(int)Enum.Parse(typeof(shipEnum), this.shipBox.Text)];
         this.configuration = new Configuration(mode, ship, new KeyBinding());
         this.Close();
     }
 }
示例#2
0
 public Configuration(GameMode gameMode, ShipArguments ship, KeyBinding keys)
 {
     this._keys     = keys;
     this._ship     = ship;
     this._gameMode = gameMode;
 }
示例#3
0
 public override void AddShip(ShipArguments s)
 {
     this._map.Ship = new Ship(s.Label, s.Position, s.Speed, s.Dimension, s.Mass, s.Health, s.Color);
     this.NotifyObservers();
 }
示例#4
0
文件: GameModel.cs 项目: K-You/MISN
 public override void AddShip(ShipArguments s)
 {
     this._map.Ship = new Ship(s.Label, s.Position, s.Speed, s.Dimension, s.Mass, s.Health, s.Color);
     this.NotifyObservers();
 }
示例#5
0
 public abstract void AddShip(ShipArguments s);
示例#6
0
 public Configuration(GameMode gameMode, ShipArguments ship, KeyBinding keys)
 {
     this._keys = keys;
     this._ship = ship;
     this._gameMode = gameMode;
 }
示例#7
0
 public abstract void AddShip(ShipArguments s);