コード例 #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);
        }
コード例 #2
0
ファイル: BopIt.cs プロジェクト: Clarksj4/OnTheStink
 private void Awake()
 {
     rotationInput = GetComponent <RotationInput>();
     bops          = GetComponentsInChildren <Bop>();
 }