private static IEnumerator<bool> MenuEnableFunction(AdditionalCoroutineSprite sp) { var sx = sp.X; for (int i = 0; i < 30; i++) { sp.X = Easing.OutQuad(i, 30, sx, 320 - sx); sp.Alpha = Easing.OutQuad(i, 30, 0.5, 0.5); sp.ScaleX = sp.ScaleY = Easing.OutQuad(i, 30, 0.8, 0.2); yield return true; } sp.X = 320; sp.Alpha = 1; sp.ScaleX = sp.ScaleY = 1; yield return true; }
private static IEnumerator<bool> MenuIntroFunction(AdditionalCoroutineSprite sp, int delay, int time, double ty) { for (int i = 0; i < delay; i++) yield return true; var sy = sp.Y; for (int i = 0; i < time; i++) { sp.Y = Easing.OutBack(i, time, sy, ty - sy); yield return true; } sp.Y = ty; }
private static IEnumerator<bool> MenuDisableFunction(AdditionalCoroutineSprite sp, double tx) { var sx = sp.X; var sa = sp.Alpha; var ss = sp.ScaleX; for (int i = 0; i < 30; i++) { sp.X = Easing.OutQuad(i, 30, sx, tx - sx); sp.Alpha = Easing.OutQuad(i, 30, sa, 0.5 - sa); sp.ScaleX = sp.ScaleY = Easing.OutQuad(i, 30, ss, 0.8 - ss); yield return true; } sp.X = tx; sp.Alpha = 0.5; sp.ScaleX = sp.ScaleY = 0.8; yield return true; }