Exemplo n.º 1
0
        public override void Play(MovieCallback callback)
        {
            if (callback == null)
            {
                Play();
                return;
            }
            if (_startFrame == _endFrame)
            {
                GotoFrame(_startFrame);
                callback(this);
                return;
            }
            Stop();

            GotoFrame(_startFrame);
            MovieImpAction     action         = new MovieImpAction(this, _startFrame, _endFrame);
            CCActionFiniteTime callbackAction = new CCCallBlock(delegate {
                callback(this);
            });
            CCActionInterval seq = CCSequence.Actions(action, callbackAction) as CCActionInterval;

            if (_loop)
            {
                _action = new CCRepeatForever(seq);
            }
            else
            {
                _action = seq;
            }
            _view.runAction(_action);
        }
Exemplo n.º 2
0
    public void Play(MovieCallback callback)
    {
        this.options          = new PlayOptions();
        this.options.callback = callback;
        string methodName = string.Empty;

        methodName = "PlayPC";
        if (methodName != string.Empty)
        {
            base.StartCoroutine(methodName, this.options);
        }
    }
Exemplo n.º 3
0
 public abstract void Play(MovieCallback callback);
Exemplo n.º 4
0
		public override void Play(MovieCallback callback){
			if (callback == null) {
				Play();
				return;
			}
			if (_startFrame == _endFrame) {
				GotoFrame(_startFrame);
				callback(this);	
				return;
			}
			Stop ();
			
			GotoFrame (_startFrame);
			MovieImpAction action = new MovieImpAction (this, _startFrame, _endFrame);
			CCActionFiniteTime callbackAction = new CCCallBlock (delegate {
				callback(this);			
			});
			CCActionInterval seq  = CCSequence.Actions (action, callbackAction) as CCActionInterval;
			if (_loop) {
				_action = new CCRepeatForever (seq);
			} else {
				_action = seq;
			}
			_view.runAction (_action);
		}
Exemplo n.º 5
0
		public abstract void Play(MovieCallback callback);