graph chart引入&骑行结果弹窗
This commit is contained in:
1 parent
40d118cea3
commit
96f3644b5b
2374 files changed
+485161
-2410
No files matched your search
@@ -0,0 +1,67 @@
|
||||
#define Graph_And_Chart_PRO
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ChartAndGraph
|
||||
{
|
||||
[RequireComponent(typeof(LineRenderer))]
|
||||
partial class LineRendererPathGenerator : PathGenerator
|
||||
{
|
||||
LineRenderer mRenderer;
|
||||
private void Start()
|
||||
{
|
||||
|
||||
}
|
||||
public void EnsureRenderer()
|
||||
{
|
||||
mRenderer = GetComponent<LineRenderer>();
|
||||
}
|
||||
public override void Clear()
|
||||
{
|
||||
EnsureRenderer();
|
||||
if (mRenderer!= null)
|
||||
{
|
||||
#if (!UNITY_5_2) && (!UNITY_5_3) && (!UNITY_5_4)
|
||||
#if !UNITY_5_5
|
||||
mRenderer.positionCount = 0;
|
||||
#else
|
||||
mRenderer.numPositions = 0;
|
||||
#endif
|
||||
#else
|
||||
mRenderer.SetVertexCount(0);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
public override void Generator(Vector3[] path, float thickness, bool closed)
|
||||
{
|
||||
EnsureRenderer();
|
||||
if (mRenderer != null)
|
||||
{
|
||||
#if !UNITY_5_2 && !UNITY_5_3 && !UNITY_5_4
|
||||
#if !UNITY_5_5
|
||||
mRenderer.startWidth = thickness;
|
||||
mRenderer.endWidth = thickness;
|
||||
mRenderer.positionCount = path.Length;
|
||||
#else
|
||||
mRenderer.startWidth = thickness;
|
||||
mRenderer.endWidth = thickness;
|
||||
mRenderer.numPositions = path.Length;
|
||||
#endif
|
||||
#else
|
||||
mRenderer.SetWidth(thickness, thickness);
|
||||
mRenderer.SetVertexCount(path.Length);
|
||||
|
||||
#endif
|
||||
|
||||
for (int i=0; i< path.Length; i++)
|
||||
{
|
||||
mRenderer.SetPosition(i, path[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user