// Use this for initialization. Starting method for our code. public void Start() { //Get the path of the Game data folder string m_Path = Application.dataPath; tradeGUIController = dockUI.GetComponent <TradeGUIController>(); stationModel = new StationModel(tradeGUIController); //Creates the sound view and sound controller. this.soundView = UnityEngine.Object.Instantiate(this.soundView); // Gets the controller from the musicView GameObject. this.soundController = this.soundView.GetComponent <SoundController>(); // Lets the Controller access the GameObject this.soundController.SetSoundView(this.soundView); this.soundController.SetSliders(this.musicSlider, this.sfxSlider); //Output the Game data path to the console this.modelLink = new ModelLink(this, mapGameObject, stationModel); // Creates the map. this.MapControllerField = new MapController(125, 250, modelLink, this, stationModel); // Gets a starting space for the player, based on coordinates. Moving away from coordinates, but they are fine for setup SpaceModel playerSpace = MapControllerField.Map.GetSpace(63, 125); // Create a player, and set up MVC connections this.playerModel = new PlayerModel(playerSpace, MapControllerField.Map, this, stationModel); modelLink.CreatePlayerView(playerModel, playerMovementText, currency, metal, organics, gas, water, fuel, fuelMax, totalSpace); MapControllerField.Map.CreateHunterKiller(playerModel, this); }
public StationModel(TradeGUIController tradeGUIController) { this.tradeGUIController = tradeGUIController; random = new System.Random(); }