I trying to create a Transition Effect Like a seen in Slide show
where I have 3 Slides to be Precise Sprites(slide)
There is a method on slide 2 that i want to call when Slide 1 finishes it Tweening
Calling a method By adding it to onFinish in the inspector of slide 1 is not give the correct transition that i want to achieve
Is there any way to do the same through scripting Like adding the method through Event Delegate...?
this is the sample snippet that i am using but could not find out what is going wrong
private bool isReversedFinished = false;
private bool death = false;
public TweenPosition overlayScreen;
public TweenPosition LevelStats;
void update(){
if (contact.normal.y < 0.9f){
death = true;
deathImminant();
}
}
void deathImminant(){
Overlay.delay = 3f;
EventDelegate.Set(Overlay.onFinished, TweenStats);
Overlay.PlayReverse();
}
public void TweenStats(){
LevelStats.Play();
}