private void LoadJSONData() { //Right now there is only first record serviced, //guess it would need some aditional UI to choose //ship that we will fly with, but it opens a lot //of potencial for upgrades, we can change score pre asteroid //depending on ship, it's speed, sprite and weapon //only by changing JSON file SpaceshipRepository shipRepo = new SpaceshipRepository(); shipRepo.LoadData(); if (shipRepo.ship != null && shipRepo.ship.fleet.SpaceShipData[0].Name != "") { shipName = shipRepo.ship.fleet.SpaceShipData[0].Name; } else { shipName = "Avanger"; } }
public SpaceshipAppService(SpaceshipRepository spaceshipRepo, PlanetRepository planetRepo) { this.spaceshipRepo = spaceshipRepo; this.planetRepo = planetRepo; }