public void Init() { ship = GameController.Instance.ship; reactorSystem = SystemController.Instance.ShipSystems.FirstOrDefault(x => x.SystemType == SystemType.Reactor) as ReactorSystem; buttonThrottleUp.onClick.AddListener(ThrottleUp); buttonThrottleDown.onClick.AddListener(ThrottleDown); }
public void CreateShipSystems(Ship ship) { isDebug = GameController.Instance.isDebuging; debugger = Debugger.instance; var rooms = RoomController.Instance.Rooms; var amountOfSystems = SystemType.GetNames(typeof(SystemType)).Length; ShipSystems = new IShipSystem[amountOfSystems - 1]; ShipSystems[0] = new ReactorSystem(ship, rooms); ShipSystems[1] = new MainframeSystem(ship, rooms); ShipSystems[2] = new MainBatterySystem(rooms); ShipSystems[3] = new LifeSupportSystem(rooms); ShipSystems[4] = new BridgeSystem(ship, rooms, this); ShipSystems[5] = new MedbaySystem(rooms); ShipSystems[6] = new CargoHoldSystem(rooms); //ShipSystems[7] = new CorridorSystem(rooms); }
public ReactorSystemViewModel(ReactorSystem reactorSystem) { ReactorSystem = reactorSystem; ReactorViewModels = new ObservableCollection <ReactorViewModel>(); int i = 1; AssembliesList = new ObservableCollection <Assemblies>(); foreach (var reactor in ReactorSystem.Reactors) { var reactorViewModel = new ReactorViewModel(reactor, assemblies => AssembliesList.Add(assemblies), assemblies => AssembliesList.Remove(Assemblies)); reactorViewModel.ReactorName = "Реактор " + i.ToString("D"); reactorViewModel.AddGraphic(new FuelGraphic()); reactorViewModel.AddGraphic(new SumFuelGraphic()); i++; ReactorViewModels.Add(reactorViewModel); } _fuelAndResourceGraphic = new FunctionalGraphic(); ReactorSystem.DayPassed += _fuelAndResourceGraphic.GetData; SystemGraphics.Add(_fuelAndResourceGraphic); SelectedGraphic = _fuelAndResourceGraphic; }
public ScenarioMinToMax(ReactorSystem reactorSystem) { _stoppedReactor = reactorSystem.Reactors[0]; _reactor = reactorSystem.Reactors[1]; _reactorSystem = reactorSystem; }