Welcome,
Guest
. Please
login
or
register
.
October 06, 2024, 05:18:31 AM
Home
Help
Search
Login
Register
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
How to use the "Event Receiver" in Tween and animation?
« previous
next »
Print
Pages: [
1
]
Author
Topic: How to use the "Event Receiver" in Tween and animation? (Read 3005 times)
xiaoniaojjj
Full Member
Thank You
-Given: 0
-Receive: 0
Posts: 140
How to use the "Event Receiver" in Tween and animation?
«
on:
September 21, 2012, 03:22:41 AM »
I saw have "Event Receiver" in Tween and animation, how to receive the Event in gameobject, and what is the event?
could you give some code to explain it?
Logged
Malzbier
Jr. Member
Thank You
-Given: 0
-Receive: 0
Posts: 93
Re: How to use the "Event Receiver" in Tween and animation?
«
Reply #1 on:
September 21, 2012, 04:14:44 AM »
I hope this helps.
TweenPosition tweenerP
=
TweenPosition
.
Begin
(
this
.
gameObject
, time, animationTo
)
;
tweenerP
.
eventReceiver
=
gameObject
;
// that game object with is holding the function
tweenerP
.
callWhenFinished
=
"Targetfunction"
;
// the function that gets called when the tween is finnised
You tell the tweener that he sould call the function "Targetfunction" on the "gameObject".
You then you just need a script on that game object that have the function "Targetfunction" (btw names are changeable)
Logged
Print
Pages: [
1
]
« previous
next »
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
How to use the "Event Receiver" in Tween and animation?