[Helper]How to add Animation in your Arraylist.kt
-
First,you need to add a utils
package net.ccbluex.liquidbounce.utils; import net.ccbluex.liquidbounce.ui.client.clickgui.AnimationUtil; public final class Translate { private float x; private float y; public Translate(float x, float y) { this.x = x; this.y = y; } public final void interpolate(float targetX, float targetY, double smoothing) { this.x = (float) AnimationUtil.animate(targetX, this.x, smoothing); this.y = (float) AnimationUtil.animate(targetY, this.y, smoothing); } public float getX() { return this.x; } public void setX(float x) { this.x = x; } public float getY() { return this.y; } public void setY(float y) { this.y = y; } }
then you should add this in your Module.kt
val translate = Translate(0f,0f)
After that you should add this in your Arraylist.kt
if (module.state) { if (module.slide < width) { module.translate.interpolate(xPos, yPos, 0.2) } } else if (!module.state) { module.translate.interpolate(xPos, -20f, 0.2) }
And change all "yPos" to "module.translate.getY()"
It's skidded from "Autumn"
-
me and the bois with da AnimationUtil.animate
-
me and da animationutil
-
what does translate mean???????
-
@hahayes use google translate to translate what does translate mean so you will see translated message and will understand what does translate mean
-
@hahayes 日本
-
@ohno said in [Helper]How to add Animation in your Arraylist.kt:
日本
enchanting table language isn't an option weary
-
@hahayes mc.standardGalacticFontRenderer
-
@jacrafter-0 by learning how to code.