初始化项目

This commit is contained in:
MuHua-123
2024-12-02 17:16:44 +08:00
parent 698464b9d7
commit 0ff284b795
327 changed files with 87 additions and 21751 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: f29e3f72f567ffc4f97bdc9129f2fe1b
guid: 84ffbf591cb4c0e4483f5c577ba37d68
MonoImporter:
externalObjects: {}
serializedVersion: 2
-22
View File
@@ -1,22 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PrefabConnector : ModulePrefab<DataConnector> {
public Transform aPonit;
public Transform bPoint;
public LineRenderer lineRenderer;
private DataConnector connector;
public override DataConnector Value => connector;
public override void UpdateVisual(DataConnector connector) {
this.connector = connector;
aPonit.localPosition = connector.aPoint;
bPoint.localPosition = connector.bPoint;
lineRenderer.SetPosition(0, connector.aPoint);
lineRenderer.SetPosition(1, connector.bPoint);
}
}
@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 139466628cb8f5d4882b2c4d84899b57
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
-21
View File
@@ -1,21 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PrefabPlateBaking : ModulePrefab<DataPlate> {
private DataPlate plate;
private MeshFilter meshFilter => GetComponent<MeshFilter>();
private MeshCollider meshCollider => GetComponent<MeshCollider>();
public override DataPlate Value => plate;
public override void UpdateVisual(DataPlate plate) {
this.plate = plate;
DataPlateBaking baking = plate.dataBaking;
//transform.localPosition = baking.position;
//transform.localEulerAngles = baking.eulerAngles;
meshFilter.mesh = baking.mesh;
meshCollider.sharedMesh = baking.mesh;
}
}
@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 78d649ecc86d78140a6fc3668cfd51d1
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
-21
View File
@@ -1,21 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PrefabPlateDesign : ModulePrefab<DataPlate> {
private DataPlate plate;
private MeshFilter meshFilter => GetComponent<MeshFilter>();
private MeshCollider meshCollider => GetComponent<MeshCollider>();
public override DataPlate Value => plate;
public override void UpdateVisual(DataPlate plate) {
this.plate = plate;
DataPlateDesign design = plate.dataDesign;
transform.localPosition = design.position;
meshFilter.mesh = design.mesh;
meshCollider.sharedMesh = design.mesh;
}
}
@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 96e2853481aa5c647a532a352a3c33d8
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
-14
View File
@@ -1,14 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PrefabPoint : ModulePrefab<DataPlatePoint> {
private DataPlatePoint point;
public override DataPlatePoint Value => point;
public override void UpdateVisual(DataPlatePoint point) {
this.point = point;
transform.localPosition = point.position;
}
}
-11
View File
@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 4746c152c7202c84f974eeab499c1e8c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
-64
View File
@@ -1,64 +0,0 @@
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PrefabSide : ModulePrefab<DataPlateSide> {
public Transform aPoint;
public Transform bPoint;
public LineRenderer lineRenderer;
public LineRenderer aBezier;
public LineRenderer bBezier;
private DataPlateSide side;
#region
/// <summary> 设计UI输入模块 </summary>
public ModuleUIInput<UnitMouseInput> UIInputDesign => ModuleCore.I.UIInputDesign;
#endregion
public override DataPlateSide Value => side;
private void Awake() {
UIInputDesign.OnChangeInput += UIInputDesign_OnChangeInput;
}
private void OnDestroy() {
if (UIInputDesign == null) { return; }
UIInputDesign.OnChangeInput -= UIInputDesign_OnChangeInput;
}
private void UIInputDesign_OnChangeInput(UnitMouseInput obj) {
Type type = UIInputDesign.Current.GetType();
if (type == typeof(DesignBezier)) { UpdateVisual(side); return; }
aPoint.gameObject.SetActive(false);
bPoint.gameObject.SetActive(false);
aBezier.gameObject.SetActive(false);
bBezier.gameObject.SetActive(false);
}
public override void UpdateVisual(DataPlateSide side) {
this.side = side;
DataPlateSideDesign design = side.dataDesign;
lineRenderer.positionCount = design.positions.Length;
lineRenderer.SetPositions(design.positions);
Type type = UIInputDesign.Current.GetType();
if (type != typeof(DesignBezier)) { ActiveGameObject(false); return; }
if (side.bezier == Bezier.) { ActiveGameObject(false); return; }
if (side.bezier == Bezier.) { ActiveGameObject(true); }
if (side.bezier == Bezier.) { ActiveGameObject(true); }
aPoint.localPosition = side.aBezier;
bPoint.localPosition = side.bBezier;
aBezier.SetPosition(0, side.aPoint.position);
aBezier.SetPosition(1, side.aBezier);
bBezier.SetPosition(0, side.bPoint.position);
bBezier.SetPosition(1, side.bBezier);
}
private void ActiveGameObject(bool isActive) {
aPoint.gameObject.SetActive(isActive);
bPoint.gameObject.SetActive(isActive);
aBezier.gameObject.SetActive(isActive);
bBezier.gameObject.SetActive(isActive);
}
}
-11
View File
@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: b75d83af36741c649b1caa22b1bd103c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
-25
View File
@@ -1,25 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PrefabSutureBaking : ModulePrefab<DataSuture> {
public LineRenderer aLineRenderer;
public LineRenderer bLineRenderer;
private DataSuture suture;
public override DataSuture Value => suture;
public override void UpdateVisual(DataSuture suture) {
this.suture = suture;
DataSutureSideBaking aBaking = suture.a.dataBaking;
DataSutureSideBaking bBaking = suture.b.dataBaking;
aLineRenderer.SetPosition(0, aBaking.PointA);
aLineRenderer.SetPosition(1, bBaking.PointA);
bLineRenderer.SetPosition(0, aBaking.PointB);
bLineRenderer.SetPosition(1, bBaking.PointB);
}
}
@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 75e541a37f3fd844bbf81bc250bd1a23
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
-25
View File
@@ -1,25 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PrefabSutureDesign : ModulePrefab<DataSuture> {
public LineRenderer aLineRenderer;
public LineRenderer bLineRenderer;
private DataSuture suture;
public override DataSuture Value => suture;
public override void UpdateVisual(DataSuture suture) {
this.suture = suture;
DataSutureSideDesign aDesign = suture.a.dataDesign;
DataSutureSideDesign bDesign = suture.b.dataDesign;
aLineRenderer.SetPosition(0, aDesign.PointA);
aLineRenderer.SetPosition(1, bDesign.PointA);
bLineRenderer.SetPosition(0, aDesign.PointB);
bLineRenderer.SetPosition(1, bDesign.PointB);
}
}
@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 1eb2df51fd021c64ba16fd7aea74de71
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -1,19 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PrefabSutureSideBaking : ModulePrefab<DataSutureSide> {
private DataSutureSide sutureSide;
public override DataSutureSide Value => sutureSide;
public LineRenderer lineRenderer => GetComponent<LineRenderer>();
public override void UpdateVisual(DataSutureSide sutureSide) {
this.sutureSide = sutureSide;
DataSutureSideBaking baking = sutureSide.dataBaking;
lineRenderer.positionCount = baking.positions.Length;
lineRenderer.SetPositions(baking.positions);
}
}
@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: f3f822abebf5e5c4a9d564052bddb818
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -1,19 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PrefabSutureSideDesign : ModulePrefab<DataSutureSide> {
private DataSutureSide sutureSide;
public override DataSutureSide Value => sutureSide;
public LineRenderer lineRenderer => GetComponent<LineRenderer>();
public override void UpdateVisual(DataSutureSide sutureSide) {
this.sutureSide = sutureSide;
DataSutureSideDesign design = sutureSide.dataDesign;
lineRenderer.positionCount = design.positions.Length;
lineRenderer.SetPositions(design.positions);
}
}
@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 4f5c45672bf96354da7017651e332f58
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: