public void doFadeOut(){
TweenPosition
.Begin(this.gameObject, 1f,
new Vector3
(-432,
-48,
0)); currentState = State.FADE_OUT;
}
public void doFadeIn(){
transform
.position = transform
.parent.TransformPoint(new Vector3
(432,
-48,
0)); NGUITools.SetActive(gameObject, true);
TweenPosition
.Begin(this.gameObject, 1f,
new Vector3
(0,
-48,
0)); currentState = State.FADE_IN;
}
// Started after the animation ends
public void performStateAfterFade(){
if(currentState == State.FADE_IN){
currentState = State.VISIBLE;
}else{
currentState = State.HIDDEN;
NGUITools.SetActive(gameObject, false);
}
}