コード例 #1
0
        public CockpitPanel(IGameLoop loop)
        {
            _loop = loop;
            _loop.RegisterHandler(LoopUpdate);
            var container = Resolver.Bootstrap();

            FuelSystem = container.Resolve <IFuelSystem>();
            Alarms     = container.Resolve <IAlarms>();
        }
コード例 #2
0
 public FuelSystem(IFuelMessaging msg, IGameLoop loop)
 {
     _msg = msg;
     loop.RegisterHandler(IntervalUpdate);
     LeftTank = new FuelTank(msg, loop)
     {
         Capacity = 12,
         Quantity = 12,
         Name     = "Left"
     };
     RightTank = new FuelTank(msg, loop)
     {
         Capacity = 12,
         Quantity = 12,
         Name     = "Right"
     };
     SelectedTank = Tank.Left;
 }
コード例 #3
0
 public FuelTank(IFuelMessaging msg, IGameLoop loop)
 {
     _msg = msg;
     loop.RegisterHandler(LoopUpdate);
 }