Пример #1
0
        public override sealed SceneState Step(ILightingController controller, Random random)
        {
            if (_animation.Step(controller, _pattern, random) == AnimationState.Complete)
            {
                return(SceneState.Complete);
            }
            _timing.Delay();
            _pattern.NextState(random);

            return(SceneState.InProgress);
        }
Пример #2
0
        public override SceneState Step(ILightingController controller, Random random)
        {
            if (_currentAnimation.Step(controller, _currentPattern, random) == AnimationState.Complete)
            {
                return(SceneState.Complete);
            }
            _currentTiming.Delay();
            _currentPattern.NextState(random);

            return(SceneState.InProgress);
        }
                public override SceneState Step(ILightingController controller, Random random)
                {
                    var pattern = _onOrOff ? _on : _off;

                    _onOrOff = !_onOrOff;

                    _animation.Step(controller, pattern, random);
                    _timing.Delay();
                    pattern.NextState(random);

                    _currentStep++;

                    if (_currentStep < 30)
                    {
                        return(SceneState.InProgress);
                    }

                    return(SceneState.Complete);
                }
Пример #4
0
        public override DemoState Step(ILightingController controller, Random random)
        {
            if (_currentAnimation == null || _currentTiming == null || _currentPattern == null)
            {
                return(DemoState.Complete);
            }

            if (_currentAnimation.Step(controller, _currentPattern, random) == AnimationState.Complete)
            {
                if (!NextScene(controller, random))
                {
                    return(DemoState.Complete);
                }
                return(DemoState.InProgress);
            }
            _currentTiming.Delay();
            _currentPattern.NextState(random);

            return(DemoState.InProgress);
        }