|
|
|
|
|
|
} |
|
|
|
|
|
|
|
canvas.drawPath(barPath, paint); |
|
|
|
if (curFrame >= 0 && curFrame < costFrames.Length && costFrames[curFrame] != 0) { |
|
|
|
float curHeight = Mathf.Min(perHeight * costFrames[curFrame] * 1000, rect.height); |
|
|
|
Rect barRect = Rect.fromLTWH(rect.left + barWidth * curFrame, rect.top + rect.height - curHeight, |
|
|
|
barWidth, curHeight); |
|
|
|
canvas.drawRect(barRect, paint2); |
|
|
|
if (curFrame >= 0 && curFrame < costFrames.Length) { |
|
|
|
if (costFrames[curFrame] != 0) { |
|
|
|
float curHeight = Mathf.Min(perHeight * costFrames[curFrame] * 1000, rect.height); |
|
|
|
Rect barRect = Rect.fromLTWH(rect.left + barWidth * curFrame, rect.top + rect.height - curHeight, |
|
|
|
barWidth, curHeight); |
|
|
|
canvas.drawRect(barRect, paint2); |
|
|
|
} |
|
|
|
|
|
|
|
var pb = new ParagraphBuilder(new ParagraphStyle { }); |
|
|
|
pb.addText("Current Frame Cost: " + costFrames[curFrame] * 1000 + "ms" + " ; Max(in last 120 frames): " + this.maxDelta() * 1000 + "ms"); |
|
|
|