Пример #1
0
    void Start()
    {
        _uiManager = UiManager.GetInstance();
        _acManager = GetComponent <AcManager>();

        _maxArmorPoint = _acManager.GetArmorPoint();
    }
Пример #2
0
    void Start()
    {
        _playerTransform = this.transform;
        _rigidbody       = GetComponent <Rigidbody>();
        _assembleManager = AssembleManager.GetInstance();
        _playerAcManager = GetComponent <AcManager>();

        _playerAcManager.SetArmorPoint(_assembleManager.GetAssembledArmorPoint());
        _movementVelocity = _assembleManager.GetAssembledMovementVelocity();

        Cursor.lockState = CursorLockMode.Locked;
    }
Пример #3
0
        // This method gets called by the runtime. Use this method to add services to the container.
        public void ConfigureServices(IServiceCollection services)
        {
            services.AddMvc();
            string comPort = Configuration["comPort"];
            string acModel = Configuration["acModel"];

            _acManager = new AcManager(null);
            services.AddSingleton(_acManager);
            if (comPort != null)
            {
                _portDriver = new SerialPortDriver(comPort);
                _portDriver.Connect();
                _acManager.SetDriver(_portDriver);
                _crAc = _acManager.CreateAc(acModel);
                services.AddSingleton(_crAc);
                services.AddSingleton(_portDriver);
            }
        }
Пример #4
0
 public AcController(AcManager acManager)
 {
     _acManager = acManager;
     _ac        = acManager.CreateAc("Daikin");
 }