Fix dot animation
This commit is contained in:
parent
125af3141d
commit
e0c511af33
@ -753,7 +753,8 @@ class StarboundClient : Closeable {
|
|||||||
|
|
||||||
private val layers = LayeredRenderer(this)
|
private val layers = LayeredRenderer(this)
|
||||||
private var dotsIndex = 0
|
private var dotsIndex = 0
|
||||||
private val dotTime = 4
|
private val dotTime = 7
|
||||||
|
private var dotCountdown = dotTime
|
||||||
private var dotInc = 1
|
private var dotInc = 1
|
||||||
|
|
||||||
private fun drawPerformanceBasic(onlyMemory: Boolean) {
|
private fun drawPerformanceBasic(onlyMemory: Boolean) {
|
||||||
@ -828,19 +829,22 @@ class StarboundClient : Closeable {
|
|||||||
|
|
||||||
builder.builder.begin(GeometryType.QUADS)
|
builder.builder.begin(GeometryType.QUADS)
|
||||||
|
|
||||||
dotsIndex += dotInc
|
if (dotCountdown-- <= 0) {
|
||||||
|
dotCountdown = dotTime
|
||||||
|
dotsIndex += dotInc
|
||||||
|
|
||||||
if (dotsIndex < 0) {
|
if (dotsIndex < 0) {
|
||||||
dotsIndex = 1
|
dotsIndex = 1
|
||||||
dotInc = 1
|
dotInc = 1
|
||||||
} else if (dotsIndex > dotTime * 3) {
|
} else if (dotsIndex >= 3) {
|
||||||
dotsIndex = dotTime * 3 - 1
|
dotsIndex = 1
|
||||||
dotInc = -1
|
dotInc = -1
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
val a = if (dotsIndex / dotTime == 0) RGBAColor.SLATE_GRAY else RGBAColor.WHITE
|
val a = if (dotsIndex == 0) RGBAColor.SLATE_GRAY else RGBAColor.WHITE
|
||||||
val b = if (dotsIndex / dotTime == 1) RGBAColor.SLATE_GRAY else RGBAColor.WHITE
|
val b = if (dotsIndex == 1) RGBAColor.SLATE_GRAY else RGBAColor.WHITE
|
||||||
val c = if (dotsIndex / dotTime == 2) RGBAColor.SLATE_GRAY else RGBAColor.WHITE
|
val c = if (dotsIndex == 2) RGBAColor.SLATE_GRAY else RGBAColor.WHITE
|
||||||
|
|
||||||
builder.builder.vertex(viewportWidth * 0.5f - size - size * 4f, viewportHeight * 0.5f - size).color(a)
|
builder.builder.vertex(viewportWidth * 0.5f - size - size * 4f, viewportHeight * 0.5f - size).color(a)
|
||||||
builder.builder.vertex(viewportWidth * 0.5f + size - size * 4f, viewportHeight * 0.5f - size).color(a)
|
builder.builder.vertex(viewportWidth * 0.5f + size - size * 4f, viewportHeight * 0.5f - size).color(a)
|
||||||
|
Loading…
Reference in New Issue
Block a user