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