Add drawutils class
This commit is contained in:
parent
64e50c3c2e
commit
9d91d6d98c
19
src/com/annimon/influencexxii/DrawUtils.java
Normal file
19
src/com/annimon/influencexxii/DrawUtils.java
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
package com.annimon.influencexxii;
|
||||||
|
|
||||||
|
import com.badlogic.gdx.graphics.Color;
|
||||||
|
import com.badlogic.gdx.math.MathUtils;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Simple functions for drawing
|
||||||
|
* @author aNNiMON
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class DrawUtils {
|
||||||
|
|
||||||
|
public static Color random2Color(int min, int max) {
|
||||||
|
float r = MathUtils.random(min, max) / 255f;;
|
||||||
|
float g = MathUtils.random(min, max) / 255f;
|
||||||
|
float b = MathUtils.random(min, max) / 255f;;
|
||||||
|
return new Color(r, g, b, 1f);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user