Exemplo n.º 1
0
        public override void OnStart(AdvEffectManager manager)
        {
            AdvEngine engine = manager.Engine;

            if (!string.IsNullOrEmpty(tweenData.ErrorMsg))
            {
                Debug.LogError(tweenData.ErrorMsg);
                OnComplete();
            }
            else
            {
                GameObject target = manager.FindTarget(this);
                if (target != null)
                {
                    isPlaying = true;
                    AdvTweenPlayer player    = target.AddComponent <AdvTweenPlayer>();
                    float          skipSpeed = engine.Page.CheckSkip() ? engine.Config.SkipSpped : 0;
                    player.Init(tweenData, engine.GraphicManager.PixelsToUnits, skipSpeed, OnComplete);
                    player.Play();
                    if (player.IsEndlessLoop)
                    {
                        waitType = WaitType.Add;
                    }
                }
                else
                {
                    //記述ミス
                    Debug.LogError(LanguageAdvErrorMsg.LocalizeTextFormat(AdvErrorMsg.NotFoundTweenGameObject, this.targetName));
                    OnComplete();
                }
            }
        }
		public override void OnStart(AdvEffectManager manager)
		{
			AdvEngine engine = manager.Engine;
			if (!string.IsNullOrEmpty(tweenData.ErrorMsg))
			{
				Debug.LogError(tweenData.ErrorMsg);
				OnComplete();
			}
			else
			{
				GameObject target = manager.FindTarget(this);
				if (target!=null)
				{
					isPlaying = true;
					AdvTweenPlayer player = target.AddComponent<AdvTweenPlayer>();
					float skipSpeed = engine.Page.CheckSkip() ? engine.Config.SkipSpped : 0;
					player.Init(tweenData, engine.GraphicManager.PixelsToUnits, skipSpeed, OnComplete);
					player.Play();
					if (player.IsEndlessLoop) waitType = WaitType.Add;
				}
				else
				{
					//記述ミス
					Debug.LogError(LanguageAdvErrorMsg.LocalizeTextFormat(AdvErrorMsg.NotFoundTweenGameObject, this.targetName ));
					OnComplete();
				}
			}
		}
Exemplo n.º 3
0
 public abstract void OnStart(AdvEffectManager manager);
Exemplo n.º 4
0
 public virtual void Play(AdvEffectManager manager, Action <AdvEffectData> onComplete)
 {
     this.manager    = manager;
     this.onComplete = onComplete;
     OnStart(manager);
 }
		public abstract void OnStart(AdvEffectManager manager);
		public virtual void Play(AdvEffectManager manager, Action<AdvEffectData> onComplete)
		{
			this.manager = manager;
			this.onComplete = onComplete;
			OnStart(manager);
		}