Доделал настройку скорости, добавил иконки на катушки с материалом
This commit is contained in:
1 parent
a3cccd5530
commit
080f5fce79
11 files changed
+17530
-10964
No files matched your search
@@ -1144,6 +1144,10 @@
|
||||
<HintPath>Library\ScriptAssemblies\Unity.XR.CoreUtils.Editor.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Unity.2D.Sprite.Editor">
|
||||
<HintPath>Library\ScriptAssemblies\Unity.2D.Sprite.Editor.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Unity.TextMeshPro">
|
||||
<HintPath>Library\ScriptAssemblies\Unity.TextMeshPro.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
@@ -1416,6 +1420,10 @@
|
||||
<HintPath>Library\ScriptAssemblies\Unity.ShaderGraph.Editor.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Unity.2D.Sprite.AIIntegration.Editor">
|
||||
<HintPath>Library\ScriptAssemblies\Unity.2D.Sprite.AIIntegration.Editor.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Unity.RenderPipelines.Core.Editor.Shared">
|
||||
<HintPath>Library\ScriptAssemblies\Unity.RenderPipelines.Core.Editor.Shared.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
|
||||
@@ -98,7 +98,9 @@
|
||||
<Compile Include="Assets\VRTemplateAssets\Scripts\CalloutGazeController.cs" />
|
||||
<Compile Include="Assets\GogoGaga\OptimizedRopesAndCables\Script\Rope.cs" />
|
||||
<Compile Include="Assets\Scripts\PlateProgramCreator.cs" />
|
||||
<Compile Include="Assets\Scripts\SliderNumToTextScript.cs" />
|
||||
<Compile Include="Assets\VRTemplateAssets\Scripts\StepManager.cs" />
|
||||
<Compile Include="Assets\Scripts\CurveText.cs" />
|
||||
<Compile Include="Assets\VRTemplateAssets\Scripts\AnchorVisuals.cs" />
|
||||
<Compile Include="Assets\Scripts\MaterialSocketChecker.cs" />
|
||||
<Compile Include="Assets\Scripts\Components_Install_Trigger.cs" />
|
||||
@@ -1415,6 +1417,10 @@
|
||||
<HintPath>Library\ScriptAssemblies\Unity.ShaderGraph.Editor.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Unity.2D.Sprite.AIIntegration.Editor">
|
||||
<HintPath>Library\ScriptAssemblies\Unity.2D.Sprite.AIIntegration.Editor.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Unity.RenderPipelines.Core.Editor.Shared">
|
||||
<HintPath>Library\ScriptAssemblies\Unity.RenderPipelines.Core.Editor.Shared.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
@@ -1439,10 +1445,6 @@
|
||||
<HintPath>Library\ScriptAssemblies\Unity.Settings.Editor.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Unity.2D.Sprite.AIIntegration.Editor">
|
||||
<HintPath>Library\ScriptAssemblies\Unity.2D.Sprite.AIIntegration.Editor.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="UnityEditor.UI">
|
||||
<HintPath>Library\ScriptAssemblies\UnityEditor.UI.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
|
||||
+17058
-10890
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,65 @@
|
||||
using UnityEngine;
|
||||
using TMPro;
|
||||
|
||||
[RequireComponent(typeof(TMP_Text))]
|
||||
public class CircularText : MonoBehaviour
|
||||
{
|
||||
public float radius = 150f;
|
||||
[Range(10, 360)] public float totalAngle = 180f; // Угол дуги в градусах
|
||||
public bool isBottomHalf = false; // Если true, текст будет выгнут вниз
|
||||
|
||||
private TMP_Text tmpText;
|
||||
private Vector3[] originalVertices;
|
||||
|
||||
void LateUpdate()
|
||||
{
|
||||
if (tmpText == null) tmpText = GetComponent<TMP_Text>();
|
||||
tmpText.ForceMeshUpdate();
|
||||
if (tmpText.textInfo.characterCount == 0) return;
|
||||
|
||||
TMP_MeshInfo meshInfo = tmpText.textInfo.meshInfo[0];
|
||||
Vector3[] vertices = meshInfo.vertices;
|
||||
|
||||
if (originalVertices == null || originalVertices.Length != vertices.Length)
|
||||
originalVertices = (Vector3[])vertices.Clone();
|
||||
|
||||
float minX = tmpText.rectTransform.rect.xMin;
|
||||
float width = tmpText.rectTransform.rect.width;
|
||||
if (width == 0) return;
|
||||
|
||||
// Рассчитываем начальный и конечный углы
|
||||
float startAngle = (180f + totalAngle / 2f) * (isBottomHalf ? -1 : 1);
|
||||
float endAngle = (180f - totalAngle / 2f) * (isBottomHalf ? -1 : 1);
|
||||
|
||||
for (int i = 0; i < tmpText.textInfo.characterCount; i++)
|
||||
{
|
||||
TMP_CharacterInfo charInfo = tmpText.textInfo.characterInfo[i];
|
||||
if (!charInfo.isVisible) continue;
|
||||
|
||||
int vIndex = charInfo.vertexIndex;
|
||||
float charCenterX = (originalVertices[vIndex + 0].x + originalVertices[vIndex + 2].x) / 2f;
|
||||
float charCenterY = (originalVertices[vIndex + 0].y + originalVertices[vIndex + 1].y) / 2f;
|
||||
|
||||
float t = Mathf.Clamp01((charCenterX - minX) / width);
|
||||
float angle = Mathf.Lerp(startAngle, endAngle, t);
|
||||
float rad = angle * Mathf.Deg2Rad;
|
||||
|
||||
// 1. Находим точку на окружности
|
||||
Vector3 circlePos = new Vector3(Mathf.Cos(rad) * radius, Mathf.Sin(rad) * radius);
|
||||
|
||||
// 2. Поворачиваем саму букву так, чтобы её "низ" смотрел в центр
|
||||
Quaternion rot = Quaternion.Euler(0, 0, angle - 90f);
|
||||
|
||||
// 3. Применяем позицию и поворот к вершинам
|
||||
for (int j = 0; j < 4; j++)
|
||||
{
|
||||
Vector3 originalPos = originalVertices[vIndex + j];
|
||||
Vector3 relativePos = originalPos - new Vector3(charCenterX, charCenterY);
|
||||
vertices[vIndex + j] = circlePos + rot * relativePos;
|
||||
}
|
||||
}
|
||||
|
||||
meshInfo.mesh.vertices = vertices;
|
||||
tmpText.UpdateGeometry(meshInfo.mesh, 0);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 008175fdcf47cde4daadce6abf412f63
|
||||
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
using System.Linq;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class MachineCoordinatesMovementScript : MonoBehaviour
|
||||
{
|
||||
@@ -26,12 +27,15 @@ public class MachineCoordinatesMovementScript : MonoBehaviour
|
||||
Vector3 CurrentCords;
|
||||
|
||||
[SerializeField]
|
||||
float CartXMaxSpeed = 1f;
|
||||
float CartXSpeed = 0.1f;
|
||||
|
||||
[SerializeField]
|
||||
float CartYMaxSpeed = 1f;
|
||||
float CartYSpeed = 0.1f;
|
||||
|
||||
[SerializeField]
|
||||
float CartZMaxSpeed = 1f;
|
||||
float CartZSpeed = 0.1f;
|
||||
|
||||
[SerializeField]
|
||||
@@ -112,10 +116,8 @@ public class MachineCoordinatesMovementScript : MonoBehaviour
|
||||
StartWork(PalmTreeProg);
|
||||
}
|
||||
|
||||
|
||||
setActiveActionButtons();
|
||||
|
||||
|
||||
if (RestartFlag == true)
|
||||
{
|
||||
if (MoveTo(Vector3.zero))
|
||||
@@ -160,6 +162,16 @@ public class MachineCoordinatesMovementScript : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
public void setSpeedHor(Slider slider)
|
||||
{
|
||||
CartXSpeed = CartXMaxSpeed * (slider.value / 100);
|
||||
CartZSpeed = CartZMaxSpeed * (slider.value / 100);
|
||||
}
|
||||
public void setSpeedVert(Slider slider)
|
||||
{
|
||||
CartYSpeed = CartYMaxSpeed * (slider.value / 100);
|
||||
}
|
||||
|
||||
void setActiveActionButtons()
|
||||
{
|
||||
List<string> buttonsToActivate = new List<string>();
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class SliderNumToTextScript : MonoBehaviour
|
||||
{
|
||||
TextMeshProUGUI textMesh;
|
||||
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
||||
void Start()
|
||||
{
|
||||
textMesh = GetComponent<TextMeshProUGUI>();
|
||||
}
|
||||
|
||||
public void OnValueChanged(Slider slider) {
|
||||
textMesh.text = slider.value + " %";
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4bf6b48ec0922f94bab583ac11141646
|
||||
@@ -74,6 +74,8 @@ MonoBehaviour:
|
||||
instantiationMode: 0
|
||||
- dependency: {fileID: 2100000, guid: b0e96864bafcfb54894bb238ad56cf3b, type: 2}
|
||||
instantiationMode: 0
|
||||
- dependency: {fileID: 2800000, guid: 48e93eef0688c4a259cb0eddcd8661f7, type: 3}
|
||||
instantiationMode: 0
|
||||
- dependency: {fileID: 2800000, guid: 740b24103b9f7f34495b6b7f576d2a66, type: 3}
|
||||
instantiationMode: 0
|
||||
- dependency: {fileID: 2800000, guid: f2e077d61d1bb3f4f83852eb857b074e, type: 3}
|
||||
@@ -136,6 +138,8 @@ MonoBehaviour:
|
||||
instantiationMode: 0
|
||||
- dependency: {fileID: 11400000, guid: eb00da65e3eb3ec4183cff0ee667a979, type: 2}
|
||||
instantiationMode: 1
|
||||
- dependency: {fileID: 2100000, guid: 79459efec17a4d00a321bdcc27bbc385, type: 2}
|
||||
instantiationMode: 0
|
||||
- dependency: {fileID: 32900000, guid: ab4937678fcde0649b3e4e6733bb6bc3, type: 3}
|
||||
instantiationMode: 1
|
||||
- dependency: {fileID: 6640387835271095783, guid: 72138a47ec7b8714c91aa39dcdf3b714, type: 3}
|
||||
@@ -204,6 +208,8 @@ MonoBehaviour:
|
||||
instantiationMode: 0
|
||||
- dependency: {fileID: 2800000, guid: 67a243112a439be4dbfbc7df8bcd78c2, type: 3}
|
||||
instantiationMode: 0
|
||||
- dependency: {fileID: 2800000, guid: 75f5f34dc1b5347e0b8351032682f224, type: 3}
|
||||
instantiationMode: 0
|
||||
- dependency: {fileID: 2800000, guid: 5f62eb492c1297245b8cd2ffa12292ba, type: 3}
|
||||
instantiationMode: 0
|
||||
- dependency: {fileID: 11400000, guid: f675742eaf9c20a4f909d78ee7a14fed, type: 2}
|
||||
@@ -220,6 +226,8 @@ MonoBehaviour:
|
||||
instantiationMode: 0
|
||||
- dependency: {fileID: 919132149155446097, guid: 635e2b9709ba10049a6c197935a12399, type: 3}
|
||||
instantiationMode: 0
|
||||
- dependency: {fileID: 2800000, guid: ebe73ca9363db456bacf42c025bb4847, type: 3}
|
||||
instantiationMode: 0
|
||||
- dependency: {fileID: 2800000, guid: bb69a5586f461da499b6e9cd4e7c4736, type: 3}
|
||||
instantiationMode: 0
|
||||
- dependency: {fileID: 2800000, guid: 3708b1d8e45366b489c18df71670cecd, type: 3}
|
||||
@@ -324,14 +332,14 @@ MonoBehaviour:
|
||||
instantiationMode: 0
|
||||
- dependency: {fileID: 2800000, guid: 55305120321825842816677005ded65c, type: 3}
|
||||
instantiationMode: 0
|
||||
- dependency: {fileID: 2800000, guid: bb1c7677987e22f47ad6833fa2e919c5, type: 3}
|
||||
instantiationMode: 0
|
||||
- dependency: {fileID: 11400000, guid: 0f906c94e2aa0c3488832acc1db04295, type: 2}
|
||||
instantiationMode: 1
|
||||
- dependency: {fileID: 2472133408010223955, guid: 4d28f6590e91f644e9731292f51c4f2c, type: 3}
|
||||
instantiationMode: 0
|
||||
- dependency: {fileID: 2800000, guid: 2731e0ad840ad6c47bd45cfd1504bd18, type: 3}
|
||||
instantiationMode: 0
|
||||
- dependency: {fileID: 2800000, guid: bb1c7677987e22f47ad6833fa2e919c5, type: 3}
|
||||
instantiationMode: 0
|
||||
- dependency: {fileID: 2800000, guid: 66b4da70f582b4044a0829eae3c42a26, type: 3}
|
||||
instantiationMode: 0
|
||||
- dependency: {fileID: 2100000, guid: 727f87098255ad04987a60f5f08390bc, type: 2}
|
||||
@@ -364,14 +372,14 @@ MonoBehaviour:
|
||||
instantiationMode: 0
|
||||
- dependency: {fileID: 2800000, guid: a80742d7996426e42b4f1ba7567823ed, type: 3}
|
||||
instantiationMode: 0
|
||||
- dependency: {fileID: 11400000, guid: ec1df508c6fb9eb45ae9f181ff6bbe82, type: 2}
|
||||
instantiationMode: 1
|
||||
- dependency: {fileID: 2800000, guid: b873120a80369e440ba03e663b63fc0e, type: 3}
|
||||
instantiationMode: 0
|
||||
- dependency: {fileID: 2800000, guid: 58ec81627005ce8498572ac193a94345, type: 3}
|
||||
instantiationMode: 0
|
||||
- dependency: {fileID: 2100000, guid: 5d9a96601b525ff40b25403df61ff736, type: 2}
|
||||
instantiationMode: 0
|
||||
- dependency: {fileID: 11400000, guid: ec1df508c6fb9eb45ae9f181ff6bbe82, type: 2}
|
||||
instantiationMode: 1
|
||||
- dependency: {fileID: 2800000, guid: 7bfa1c24d1908db47a1bbcbac1a10261, type: 3}
|
||||
instantiationMode: 0
|
||||
- dependency: {fileID: 9100000, guid: db6239f7ccb29ca4aac63126c6a35e7d, type: 2}
|
||||
@@ -516,6 +524,8 @@ MonoBehaviour:
|
||||
instantiationMode: 0
|
||||
- dependency: {fileID: 6507399986997092475, guid: 254b742d65a15d14b9df756ae77de868, type: 3}
|
||||
instantiationMode: 0
|
||||
- dependency: {fileID: 2100000, guid: 9dfc825aed78fcd4ba02077103263b40, type: 2}
|
||||
instantiationMode: 0
|
||||
- dependency: {fileID: 2100000, guid: 0a35b7e20f75a8540a2c14b9555078cb, type: 2}
|
||||
instantiationMode: 0
|
||||
- dependency: {fileID: 1064811109664483937, guid: 29529d949c965f643befe6cfcd1e372c, type: 3}
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -73,9 +73,9 @@ Material:
|
||||
- _OutlineWidth: 0
|
||||
- _PerspectiveFilter: 0.875
|
||||
- _Reflectivity: 10
|
||||
- _ScaleRatioA: 0.8333333
|
||||
- _ScaleRatioB: 0.6770833
|
||||
- _ScaleRatioC: 0.6770833
|
||||
- _ScaleRatioA: 0.75
|
||||
- _ScaleRatioB: 0.609375
|
||||
- _ScaleRatioC: 0.609375
|
||||
- _ScaleX: 1
|
||||
- _ScaleY: 1
|
||||
- _ShaderFlags: 0
|
||||
|
||||
Reference in new issue
Block a user