Exemple #1
0
        private void Start()
        {
            if (_verticalConductor != null)
            {
                _verticalConductor.OnConnect()
                .TakeUntilDestroy(this)
                .Subscribe(_ => Decision(GetDirection()));
            }

            if (_horizontalConductor != null)
            {
                _horizontalConductor.OnConnect()
                .TakeUntilDestroy(this)
                .Subscribe(_ => Decision(GetDirection()));
            }
        }
Exemple #2
0
 private void Awake()
 {
     _conductor.OnConnect()
     .TakeUntilDestroy(this)
     .Subscribe(_ => SetConnect(!_));
 }
Exemple #3
0
 private void Start()
 {
     _conductor.OnConnect()
     .TakeUntilDestroy(this)
     .Subscribe(Decision);
 }