index is reversed, transparency not working

This commit is contained in:
minjaesong
2020-09-09 16:58:35 +09:00
parent f5624af47c
commit ac144da0b4

View File

@@ -17,7 +17,7 @@ class UIItemHorizontalFadeSlide(
vararg uis: UICanvas
) : UIItemTransitionContainer(parent, initialX, initialY, width, height, 0.212f, currentPosition, uis) {
fun getOffX(index: Int) = ((currentPosition - index) * width).roundToInt()
fun getOffX(index: Int) = ((currentPosition - index) * width / 2f).roundToInt()
fun getOpacity(index: Int) = (currentPosition - index).coerceIn(0f, 1f)
init {