Exemplo n.º 1
0
        protected override void PostConstruct()
        {
            base.PostConstruct();

            RotationInput
            .Select(v => v * 0.02f)
            .TakeUntil(Disposed.Where(identity))
            .Subscribe(v => Rotation -= v, this);
            ZoomInput
            .TakeUntil(Disposed.Where(identity))
            .Subscribe(v => Distance -= v * 0.15f, this);

            OnActiveStateChange
            .Do(v => _rotationInput.Iter(i => i.Active = v))
            .Do(v => _zoomInput.Iter(i => i.Active     = v))
            .TakeUntil(Disposed.Where(identity))
            .Subscribe(this);
        }
Exemplo n.º 2
0
 private void Awake()
 {
     rotationInput = GetComponent <RotationInput>();
     bops          = GetComponentsInChildren <Bop>();
 }