1
NGUI 3 Support / Tween Delay problem
« on: June 04, 2013, 04:49:42 AM »
Normal i would use the following code to start the tween.
The problem is that if i start the tween this way i can use the delay:
I tried to create the tween fist and start it later, like this:
But i get errors...
What the correct way to use the delay ?
EDIT: If found out how:
Using the keyword new was not a nice idea
- weenTransform TweenTwo = TweenTransform.Begin(this.gameObject,3f,animationAncorTwo);
- TweenTwo.delay = 5f;
I tried to create the tween fist and start it later, like this:
- TweenTwo.delay = 5f;
- TweenTwo.Play(true);
- NullReferenceException
- UITweener.Play (Boolean forward) (at Assets/NGUI/Scripts/Tweening/UITweener.cs:283)
- HandDemo.SteppTwo () (at Assets/GUI/Scripts/HandDemo.cs:38)
- UnityEngine.GameObject:SendMessage(String, Object, SendMessageOptions)
- UITweener:Update() (at Assets/NGUI/Scripts/Tweening/UITweener.cs:188)
What the correct way to use the delay ?
EDIT: If found out how:
- TweenTransform TweenTwo = this.gameObject.AddComponent<TweenTransform>();
- TweenTwo.delay = 5f;
- TweenTwo.Play(true);