更改文件架构

This commit is contained in:
CortexCore
2023-06-07 18:38:07 +08:00
parent 93292b1a59
commit ed84166723
720 changed files with 297 additions and 65 deletions

View File

@@ -0,0 +1,17 @@
{
"name": "BITKit.Renderer",
"rootNamespace": "",
"references": [
"GUID:14fe60d984bf9f84eac55c6ea033a8f4",
"GUID:9400d40641bab5b4a9702f65bf5c6eb5"
],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 48c71d5238544f149b295cc40e244719
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,36 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Pool;
namespace BITKit
{
[ExecuteAlways]
public class LineConnector : MonoBehaviour
{
public LineRenderer lineRenderer;
public Transform[] points;
public float radius = 0.64f;
public int excuteTimes;
void Update()
{
if (lineRenderer && points.Length > 0)
{
var list = ListPool<Vector3>.Get();
var currentPosition = points[0].position;
list.Add(currentPosition);
foreach (var point in points)
{
if (Vector3.Distance(point.position, currentPosition) >= radius)
{
list.Add(currentPosition = point.position);
}
//list.Add(point.position);
}
lineRenderer.positionCount =list.Count;
lineRenderer.SetPositions(list.ToArray());
ListPool<Vector3>.Release(list);
excuteTimes++;
}
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 69ef16681d6f34d4d9ccc4200c8e2471
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: