Commit 1d9b5391 authored by BlackAngle233's avatar BlackAngle233
Browse files

3.31 update

parent 708d3dee
......@@ -280,7 +280,7 @@
<HintPath>C:/Program Files (x86)/Microsoft Visual Studio Tools for Unity/16.0/Editor/SyntaxTree.VisualStudio.Unity.Bridge.dll</HintPath>
</Reference>
<Reference Include="nunit.framework">
<HintPath>C:/Users/BlackAngle/Desktop/MathTec/Library/PackageCache/com.unity.ext.nunit@1.0.0/net35/unity-custom/nunit.framework.dll</HintPath>
<HintPath>C:/Users/BlackAngle/Desktop/MathsEngine/MathTec/Library/PackageCache/com.unity.ext.nunit@1.0.0/net35/unity-custom/nunit.framework.dll</HintPath>
</Reference>
<Reference Include="UnityEditor.iOS.Extensions.Xcode">
<HintPath>C:/Program Files/Unity/Hub/Editor/2019.4.3f1/Editor/Data/PlaybackEngines/iOSSupport/UnityEditor.iOS.Extensions.Xcode.dll</HintPath>
......
fileFormatVersion: 2
guid: 00f4362dc9b97a64fa7816902249c6c2
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &4047237068335015579
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8445645578604956457}
- component: {fileID: 5672974249124204919}
- component: {fileID: 591559750317111257}
- component: {fileID: 8112878636440222830}
m_Layer: 5
m_Name: Button
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &8445645578604956457
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4047237068335015579}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 5517939706427216285}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 53, y: 2}
m_SizeDelta: {x: 30, y: 30}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &5672974249124204919
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4047237068335015579}
m_CullTransparentMesh: 0
--- !u!114 &591559750317111257
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4047237068335015579}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!114 &8112878636440222830
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4047237068335015579}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 591559750317111257}
m_OnClick:
m_PersistentCalls:
m_Calls: []
--- !u!1 &7776871908361990743
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5517939706427216285}
- component: {fileID: 8142670295446156480}
- component: {fileID: 2464734034491314601}
m_Layer: 5
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &5517939706427216285
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7776871908361990743}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 8445645578604956457}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &8142670295446156480
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7776871908361990743}
m_CullTransparentMesh: 0
--- !u!114 &2464734034491314601
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7776871908361990743}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
m_RaycastTarget: 1
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 14
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 10
m_MaxSize: 40
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: A
fileFormatVersion: 2
guid: 16d81ab5e15a2cb42bfe186b33060b0a
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
......@@ -185,7 +185,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 4
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &669627296
GameObject:
......@@ -448,7 +448,7 @@ GameObject:
- component: {fileID: 907385374}
- component: {fileID: 907385373}
m_Layer: 5
m_Name: Button
m_Name: Line
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
......@@ -516,7 +516,18 @@ MonoBehaviour:
m_TargetGraphic: {fileID: 907385374}
m_OnClick:
m_PersistentCalls:
m_Calls: []
m_Calls:
- m_Target: {fileID: 947894780}
m_MethodName: createLineButton
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
--- !u!114 &907385374
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -648,7 +659,7 @@ RectTransform:
- {fileID: 1923982258}
- {fileID: 907385372}
m_Father: {fileID: 0}
m_RootOrder: 3
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
......@@ -667,6 +678,11 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 96493b04dda6c1e45bbf6b276e9c2d23, type: 3}
m_Name:
m_EditorClassIdentifier:
pointsParent: {fileID: 1923982258}
linesParent: {fileID: 907385372}
button: {fileID: 4047237068335015579, guid: 16d81ab5e15a2cb42bfe186b33060b0a, type: 3}
line: {fileID: 4047237068335015579, guid: 16d81ab5e15a2cb42bfe186b33060b0a, type: 3}
CM: {fileID: 1753994397}
--- !u!1 &963194225
GameObject:
m_ObjectHideFlags: 0
......@@ -806,7 +822,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 5
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1923982257
GameObject:
......@@ -889,7 +905,18 @@ MonoBehaviour:
m_TargetGraphic: {fileID: 1923982260}
m_OnClick:
m_PersistentCalls:
m_Calls: []
m_Calls:
- m_Target: {fileID: 947894780}
m_MethodName: createPoint
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
--- !u!114 &1923982260
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -927,97 +954,3 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1923982257}
m_CullTransparentMesh: 0
--- !u!1 &1952579461
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1952579463}
- component: {fileID: 1952579462}
- component: {fileID: 1952579464}
- component: {fileID: 1952579465}
m_Layer: 0
m_Name: GameObject
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1952579462
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1952579461}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 8b6695f9fc2dd3b4c8670a9a7352ea27, type: 3}
m_Name:
m_EditorClassIdentifier:
CM: {fileID: 0}
width: 0.02
--- !u!4 &1952579463
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1952579461}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!23 &1952579464
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1952579461}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 971be4e06c9042749a9670b74f587932, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!33 &1952579465
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1952579461}
m_Mesh: {fileID: 0}
......@@ -149,12 +149,12 @@ public class CanvasManager3D : MonoBehaviour
PrintPoints();
}
public void createPoint(string name = "")
public string createPoint(string name = "")
{
if (name.Equals(""))
{
char n = 'A';
while (!points.ContainsKey(n.ToString()))
while (points.ContainsKey(n.ToString()))
{
n++;
}
......@@ -166,6 +166,7 @@ public class CanvasManager3D : MonoBehaviour
Point p = new Point(0, 0, 0, name);
points.Add(name, p);
}
return name;
}
public void setPoint(string name, float x, float y, float z)
......@@ -201,7 +202,7 @@ public class CanvasManager3D : MonoBehaviour
return tmp;
}
public void createLine(string n1, string n2, float length = 0)
public string createLine(string n1, string n2, float length = 0)
{
Point p1 = null, p2 = null;
......@@ -220,7 +221,9 @@ public class CanvasManager3D : MonoBehaviour
p1.addLine(line);
p2.addLine(line);
return lineName;
}
return "";
}
public void setLine(string n, float length)
......
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class UIManager : MonoBehaviour
{
List<GameObject> points;
List<GameObject> lines;
public Transform pointsParent;
public Transform linesParent;
public GameObject button;
public GameObject line;
string chosen1 = "";
string chosen2 = "";
public CanvasManager3D CM;
enum UIState
{
none,
createLine
}
UIState state = UIState.none;
// Start is called before the first frame update
void Start()
{
points = new List<GameObject>();
lines = new List<GameObject>();
}
// Update is called once per frame
void Update()
{
switch (state)
{
case UIState.none:
break;
case UIState.createLine:
if(!chosen1.Equals("") && !chosen2.Equals(""))
{
createLine();
}
break;
}
}
public void createPoint()
{
string n = CM.createPoint();
GameObject tmp = Instantiate(button);
tmp.transform.SetParent(pointsParent);
points.Add(tmp);
tmp.transform.localPosition = new Vector3(50 + 40 * (points.Count - 1), 0, 0);
tmp.GetComponentInChildren<Text>().text = n;
tmp.GetComponent<Button>().onClick.AddListener(delegate(){ chooseObject(n); });
}
public void createLineButton()
{
state = UIState.createLine;
}
void createLine()
{
string n = CM.createLine(chosen1, chosen2);
chosen1 = "";
chosen2 = "";
GameObject tmp = Instantiate(line);
tmp.transform.SetParent(linesParent);
lines.Add(tmp);
tmp.transform.localPosition = new Vector3(50 + 40 * (lines.Count - 1), 0, 0);
tmp.GetComponentInChildren<Text>().text = n;
state = UIState.none;
}
public void chooseObject(string obj)
{
if (chosen1.Equals(""))
chosen1 = obj;
if (!chosen1.Equals("") && !chosen1.Equals(obj) && chosen2.Equals(""))
chosen2 = obj;
}
public void LineButton()
{
if(state == UIState.none)
{
}
}
}
......@@ -13,7 +13,7 @@ public class test : MonoBehaviour
// Start is called before the first frame update
void Start()
{
lines = new List<Line>();
}
// Update is called once per frame
......@@ -49,9 +49,10 @@ public class test : MonoBehaviour
}
mesh.SetIndices(triangles, MeshTopology.Triangles, 0);
}
else
{
lines = CM.GetLines();
}
}
public void getDig()
{
lines = CM.GetLines();
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment