Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -6,9 +6,9 @@ import arc.math.*;
|
|||||||
import arc.util.*;
|
import arc.util.*;
|
||||||
|
|
||||||
public class ShapePart extends DrawPart{
|
public class ShapePart extends DrawPart{
|
||||||
public boolean circle = false;
|
public boolean circle = false, hollow = false;
|
||||||
public int sides = 3;
|
public int sides = 3;
|
||||||
public float radius = 3f, radiusTo = -1f;
|
public float radius = 3f, radiusTo = -1f, stroke = 1f, strokeTo = -1f;
|
||||||
public float x, y, rotation;
|
public float x, y, rotation;
|
||||||
public float moveX, moveY, moveRot;
|
public float moveX, moveY, moveRot;
|
||||||
public Color color = Color.white;
|
public Color color = Color.white;
|
||||||
@@ -38,7 +38,8 @@ public class ShapePart extends DrawPart{
|
|||||||
float
|
float
|
||||||
rx = params.x + Tmp.v1.x,
|
rx = params.x + Tmp.v1.x,
|
||||||
ry = params.y + Tmp.v1.y,
|
ry = params.y + Tmp.v1.y,
|
||||||
rad = radiusTo < 0 ? radius : Mathf.lerp(radius, radiusTo, prog);
|
rad = radiusTo < 0 ? radius : Mathf.lerp(radius, radiusTo, prog),
|
||||||
|
str = strokeTo < 0 ? stroke : Mathf.lerp(stroke, strokeTo, prog);
|
||||||
|
|
||||||
if(color != null && colorTo != null){
|
if(color != null && colorTo != null){
|
||||||
Draw.color(color, colorTo, prog);
|
Draw.color(color, colorTo, prog);
|
||||||
@@ -46,10 +47,20 @@ public class ShapePart extends DrawPart{
|
|||||||
Draw.color(color);
|
Draw.color(color);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!circle){
|
if(!hollow){
|
||||||
Fill.poly(rx, ry, sides, rad, moveRot * prog * sign + params.rotation - 90 * sign + rotation * sign);
|
if(!circle){
|
||||||
|
Fill.poly(rx, ry, sides, rad, moveRot * prog * sign + params.rotation - 90 * sign + rotation * sign);
|
||||||
|
}else{
|
||||||
|
Fill.circle(rx, ry, rad);
|
||||||
|
}
|
||||||
}else{
|
}else{
|
||||||
Fill.circle(rx, ry, rad);
|
Lines.stroke(str);
|
||||||
|
if(!circle){
|
||||||
|
Lines.poly(rx, ry, sides, rad, moveRot * prog * sign + params.rotation - 90 * sign + rotation * sign);
|
||||||
|
}else{
|
||||||
|
Lines.circle(rx, ry, rad);
|
||||||
|
}
|
||||||
|
Lines.stroke(1f);
|
||||||
}
|
}
|
||||||
if(color != null) Draw.color();
|
if(color != null) Draw.color();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user