//------------------------------------------------------------------------------------------------------------- public void StartEffectExit(Rect sRect, STSEffectMoreInfos sEffectMoreInfos) { PrepareEffectExit(sRect); AnimPurcent = 0.0F; Direction = 1; AnimIsPlaying = true; AnimIsFinished = false; }
//------------------------------------------------------------------------------------------------------------- private void AnimationTransitionOut(STSTransition sThisSceneParameters, STSTransitionData sDatas) { EffectType = sThisSceneParameters.EffectOnExit.GetEffect(); if (EffectType == null) { EffectType = new STSEffectFade(); } STSEffectMoreInfos sMoreInfos = null; if (sDatas != null) { sMoreInfos = sDatas.EffectMoreInfos; } EffectType.StartEffectExit(new Rect(0, 0, Screen.width, Screen.height), sMoreInfos); }
//------------------------------------------------------------------------------------------------------------- private void AnimationTransitionIn(STSTransition sThisSceneParameters, STSTransitionData sDatas) { Color tOldColor = Color.black; float tInterlude = 0; if (EffectType != null) { // I get the old value of tOldColor = new Color(EffectType.TintPrimary.r, EffectType.TintPrimary.g, EffectType.TintPrimary.b, EffectType.TintPrimary.a); tInterlude = sThisSceneParameters.InterEffectDuration; } EffectType = sThisSceneParameters.EffectOnEnter.GetEffect(); if (EffectType == null) { EffectType = new STSEffectFade(); } STSEffectMoreInfos sMoreInfos = null; if (sDatas != null) { sMoreInfos = sDatas.EffectMoreInfos; } EffectType.StartEffectEnter(new Rect(0, 0, Screen.width, Screen.height), tOldColor, tInterlude, sMoreInfos); }
//------------------------------------------------------------------------------------------------------------- public void StartEffectEnter(Rect sRect, Color sOldColor, float sInterEffectDelay, STSEffectMoreInfos sEffectMoreInfos) { PrepareEffectEnter(sRect); ColorIsPlaying = false; if (sInterEffectDelay > 0) { // I need do to a color transitionpublic float ColorPurcent = 0.0F; ColorDuration = sInterEffectDelay; OldColor = sOldColor; ColorIsPlaying = true; ColorIsFinished = false; } else { ColorIsFinished = true; } AnimPurcent = 0.0F; Direction = -1; AnimIsPlaying = true; AnimIsFinished = false; }