Пример #1
0
        public override void OnEnter()
        {
            _player = playerType == PlayerType.ClipPlayer ? (IClipPlayer)clipPlayer : (IClipPlayer)clipPlayerUI;

            switch (actionType)
            {
            case ActionType.Play:
                var proxyClip = (AnimatedClipProxy)clip.Value;
                Gif.PlayClip(_player, proxyClip.clip, startDelay.Value, loop.Value);
                break;

            case ActionType.Pause:
                Gif.PausePlayer(_player);
                break;

            case ActionType.Resume:
                Gif.ResumePlayer(_player);
                break;

            case ActionType.Stop:
                Gif.StopPlayer(_player);
                break;
            }

            Finish();
        }