public void startFadeInAndOut(float speed, fadeControlAni startFade, fadeControlAni endFade, float delayedTime = 0, int drowCount = 1) { startFadeIn_OR_Out(startFade, endFade, speed / 2); _delayedTime = delayedTime; _inOutCount = drowCount; _delayStart = false; _swapSpeedControl = false; _startSpeed = _endspeed = speed / 2; }
public bool startFadeIn_OR_Out(fadeControlAni startFade, fadeControlAni endFade, float speed) { sColor = _oroginalColor; eColor = _oroginalColor; switch (startFade) { case fadeControlAni.view: sColor.a = 1; break; case fadeControlAni.halfView: sColor.a = 0.5f; break; case fadeControlAni.hide: sColor.a = 0; break; } switch (endFade) { case fadeControlAni.view: eColor.a = 1; break; case fadeControlAni.halfView: eColor.a = 0.5f; break; case fadeControlAni.hide: eColor.a = 0; break; } _delayedTime = _inOutCount = 0; return(startFadeIn_OR_Out(speed, sColor, eColor)); }