Rename index to value in the enums
This commit is contained in:
@@ -81,7 +81,7 @@ public class LodChunk
|
||||
// by default have the colors invisible
|
||||
for(ColorDirection dir : ColorDirection.values())
|
||||
{
|
||||
colors[dir.index] = new Color(0, 0, 0, 0);
|
||||
colors[dir.value] = new Color(0, 0, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -182,7 +182,7 @@ public class LodChunk
|
||||
}
|
||||
}
|
||||
|
||||
colors[dir.index] = new Color(red, green, blue);
|
||||
colors[dir.value] = new Color(red, green, blue);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -222,7 +222,7 @@ public class LodChunk
|
||||
// determine the average color for each direction
|
||||
for(ColorDirection dir : ColorDirection.values())
|
||||
{
|
||||
colors[dir.index] = generateLodColorSection(chunk, world, dir);
|
||||
colors[dir.value] = generateLodColorSection(chunk, world, dir);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -721,7 +721,7 @@ public class LodChunk
|
||||
// s += "(" + colors[i].getRed() + ", " + colors[i].getGreen() + ", " + colors[i].getBlue() + "), ";
|
||||
// }
|
||||
|
||||
s += "(" + colors[ColorDirection.TOP.index].getRed() + ", " + colors[ColorDirection.TOP.index].getGreen() + ", " + colors[ColorDirection.TOP.index].getBlue() + "), ";
|
||||
s += "(" + colors[ColorDirection.TOP.value].getRed() + ", " + colors[ColorDirection.TOP.value].getGreen() + ", " + colors[ColorDirection.TOP.value].getBlue() + "), ";
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
@@ -165,7 +165,7 @@ public class LodRenderer
|
||||
continue;
|
||||
}
|
||||
|
||||
Color c = lod.colors[ColorDirection.TOP.index];
|
||||
Color c = lod.colors[ColorDirection.TOP.value];
|
||||
|
||||
double yOffset = -cameraY;
|
||||
|
||||
|
||||
@@ -25,10 +25,10 @@ public enum ColorDirection
|
||||
/** -Y */
|
||||
BOTTOM(5);
|
||||
|
||||
public final int index;
|
||||
public final int value;
|
||||
|
||||
private ColorDirection(int newValue)
|
||||
{
|
||||
index = newValue;
|
||||
value = newValue;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,10 +23,10 @@ public enum DrawMode
|
||||
*/
|
||||
INDIVIDUAL(5);
|
||||
|
||||
public final int index;
|
||||
public final int value;
|
||||
|
||||
private DrawMode(int newValue)
|
||||
{
|
||||
index = newValue;
|
||||
value = newValue;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user