Finished adding all modules

This commit is contained in:
Christen
2026-03-03 19:13:28 -05:00
parent 20480f6eaf
commit 69b3b09ac0
35 changed files with 1068 additions and 71 deletions

View File

@@ -11,6 +11,8 @@ public class DCMotorModule : ModuleBase
public float rotationSpeed = 90f; public float rotationSpeed = 90f;
private float targetPosition = 0f; private float targetPosition = 0f;
public override string moduleType => "DC";
public override string moduleName => "DC Module";
public void Rotate(float degrees, int direction) public void Rotate(float degrees, int direction)
{ {

View File

@@ -3,6 +3,8 @@ using UnityEngine;
public class DisplayModule : ModuleBase public class DisplayModule : ModuleBase
{ {
public string displayText = ""; public string displayText = "";
public override string moduleType => "Display";
public override string moduleName => "Display Module";
public void SetDisplayText(string text) public void SetDisplayText(string text)
{ {

View File

@@ -3,6 +3,8 @@ public class DistanceSensorModule : ModuleBase
public bool objectDetected; public bool objectDetected;
public float distanceMeters; public float distanceMeters;
public string[] infoLines = new string[0]; public string[] infoLines = new string[0];
public override string moduleType => "Distance";
public override string moduleName => "Distance Sensor Module";
void Update() void Update()
{ {

View File

@@ -11,6 +11,8 @@ public class GripperModule : ServoMotorModule
public float maxPincerDistance = 0.02f; public float maxPincerDistance = 0.02f;
public override string servoType => "Gripper"; public override string servoType => "Gripper";
public override string moduleType => "Gripper";
public override string moduleName => "Gripper Module";
// Cache the original local positions so we don't stomp Y/Z (or any authored offsets). // Cache the original local positions so we don't stomp Y/Z (or any authored offsets).
private Vector3 _leftStartLocalPos; private Vector3 _leftStartLocalPos;

8
Assets/HubModule_MMMF.cs Normal file
View File

@@ -0,0 +1,8 @@
using UnityEngine;
public class HubModule_MMMF : HubModule
{
public override string moduleType => "HubMMMF";
public override string moduleName => "Hub Module MMMF";
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 1165e4f8774c6497799cf8ca9f3be91d

7
Assets/HubModule_MMMM.cs Normal file
View File

@@ -0,0 +1,7 @@
using UnityEngine;
public class HubModule_MMMM : HubModule
{
public override string moduleType => "HubMMMM";
public override string moduleName => "Hub Module MMMM";
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 010c197661ed94ba09e4fd1451016466

View File

@@ -10,6 +10,8 @@ public class IMUSensorModule : ModuleBase
[Header("UI Lines")] [Header("UI Lines")]
public string[] infoLines = new string[0]; public string[] infoLines = new string[0];
public override string moduleType => "IMU";
public override string moduleName => "IMU Sensor Module";
void Update() void Update()
{ {

View File

@@ -245,18 +245,7 @@ public class LiveViewModulePanel : MonoBehaviour
string GetModuleTypeName(ModuleBase m) string GetModuleTypeName(ModuleBase m)
{ {
if (m is ServoBendModule) return "Servo Bend"; return m != null ? m.moduleName : "Unknown";
if (m is ServoStraightModule) return "Servo Straight";
if (m is DCMotorModule) return "DC";
if (m is DisplayModule) return "Display";
if (m is HubModule) return "Hub";
if (m is PowerModule) return "Power";
if (m is GripperModule) return "Gripper";
if (m is DisplayModule) return "Display";
if (m is DistanceSensorModule) return "Distance Sensor";
if (m is IMUSensorModule) return "IMU Sensor";
if (m is SpeakerModule) return "Speaker";
return m.GetType().Name;
} }
string GetDegreeInfo(ModuleBase m) string GetDegreeInfo(ModuleBase m)

View File

@@ -26,8 +26,8 @@ Transform:
m_GameObject: {fileID: 3270690827030321342} m_GameObject: {fileID: 3270690827030321342}
serializedVersion: 2 serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0.7071068, w: 0.7071068} m_LocalRotation: {x: 0, y: 0, z: 0.7071068, w: 0.7071068}
m_LocalPosition: {x: -1700.5491, y: -143.65674, z: 1793.4878} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 20, y: 20, z: 20}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: m_Children:
- {fileID: 4055238879951325494} - {fileID: 4055238879951325494}

View File

@@ -2,6 +2,6 @@ using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;
public class HubModule : ModuleBase public abstract class HubModule : ModuleBase
{ {
} }

View File

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

View File

@@ -0,0 +1,287 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &1722399615818003324
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4587194206261523046}
m_Layer: 0
m_Name: MaleSocket3
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &4587194206261523046
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1722399615818003324}
serializedVersion: 2
m_LocalRotation: {x: 0.5, y: -0.5, z: 0.5, w: 0.5}
m_LocalPosition: {x: -0.0201, y: -0.0202, z: 0.045}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 3170080666506033130}
m_LocalEulerAnglesHint: {x: 90, y: -90, z: 0}
--- !u!1 &3832956782768222763
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3198895037803607166}
m_Layer: 0
m_Name: MaleSocket4
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &3198895037803607166
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3832956782768222763}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0.7071068, z: -0.7071068, w: 0}
m_LocalPosition: {x: -0.045, y: -0.02029, z: 0.02006}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 3170080666506033130}
m_LocalEulerAnglesHint: {x: 90, y: 0, z: -180}
--- !u!1 &4643042175922059076
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2699515204743532535}
m_Layer: 0
m_Name: MaleSocket2
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &2699515204743532535
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4643042175922059076}
serializedVersion: 2
m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068}
m_LocalPosition: {x: 0.0036, y: -0.0196, z: 0.0191}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 3170080666506033130}
m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0}
--- !u!1 &6210873077440843193
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3170080666506033130}
- component: {fileID: -480505059275901349}
m_Layer: 0
m_Name: HubModule_MMMM
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &3170080666506033130
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6210873077440843193}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 20, y: 20, z: 20}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 8423141809489016840}
- {fileID: 8327258240500989920}
- {fileID: 2699515204743532535}
- {fileID: 4587194206261523046}
- {fileID: 3198895037803607166}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &-480505059275901349
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6210873077440843193}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 010c197661ed94ba09e4fd1451016466, type: 3}
m_Name:
m_EditorClassIdentifier: '::'
--- !u!1 &6215686394367246164
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8327258240500989920}
m_Layer: 0
m_Name: MaleSocket1
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &8327258240500989920
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6215686394367246164}
serializedVersion: 2
m_LocalRotation: {x: 0.5, y: 0.5, z: -0.5, w: 0.5}
m_LocalPosition: {x: -0.0202, y: -0.0197, z: -0.004}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 3170080666506033130}
m_LocalEulerAnglesHint: {x: 90, y: 90, z: 0}
--- !u!1 &6422506334253418019
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8423141809489016840}
- component: {fileID: 4916887436287976360}
- component: {fileID: 5488067890827508766}
- component: {fileID: 8788637569486670128}
m_Layer: 0
m_Name: Body1
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &8423141809489016840
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6422506334253418019}
serializedVersion: 2
m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 10, y: 10, z: 10}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 3170080666506033130}
m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0}
--- !u!33 &4916887436287976360
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6422506334253418019}
m_Mesh: {fileID: 8604045607132181640, guid: 75fcb9600b53b4feba38c37c6f59c6b1, type: 3}
--- !u!23 &5488067890827508766
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6422506334253418019}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RayTracingAccelStructBuildFlagsOverride: 0
m_RayTracingAccelStructBuildFlags: 1
m_SmallMeshCulling: 1
m_ForceMeshLod: -1
m_MeshLodSelectionBias: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 7397659539795428015, guid: 75fcb9600b53b4feba38c37c6f59c6b1, type: 3}
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_GlobalIlluminationMeshLod: 0
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_MaskInteraction: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!65 &8788637569486670128
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6422506334253418019}
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_LayerOverridePriority: 0
m_IsTrigger: 0
m_ProvidesContacts: 0
m_Enabled: 1
serializedVersion: 3
m_Size: {x: 0.005911351, y: 0.0057138843, z: 0.004000001}
m_Center: {x: -0.002014174, y: 0.0019173399, z: 0.0020000006}

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 56513ce62d2504919b218e5c1c59b7fe
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -25,7 +25,7 @@ Transform:
m_GameObject: {fileID: 266408585238236575} m_GameObject: {fileID: 266408585238236575}
serializedVersion: 2 serializedVersion: 2
m_LocalRotation: {x: 0.006214511, y: 0.006214511, z: 0.70707947, w: 0.70707947} m_LocalRotation: {x: 0.006214511, y: 0.006214511, z: 0.70707947, w: 0.70707947}
m_LocalPosition: {x: -0.0219, y: -0.005, z: 0.02312} m_LocalPosition: {x: -0.0219, y: -0.0059, z: 0.02312}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: [] m_Children: []

View File

@@ -119,6 +119,9 @@ public class TopologyBuilder : MonoBehaviour
case "Distance": return ModuleType.DISTANCE_SENSOR; case "Distance": return ModuleType.DISTANCE_SENSOR;
case "IMU": return ModuleType.IMU; case "IMU": return ModuleType.IMU;
case "Speaker": return ModuleType.SPEAKER; case "Speaker": return ModuleType.SPEAKER;
case "Splitter2": return ModuleType.SPLITTER_2;
case "Splitter3": return ModuleType.SPLITTER_3;
case "Splitter4": return ModuleType.SPLITTER_4;
default: return ModuleType.SPLITTER; default: return ModuleType.SPLITTER;
} }
} }

View File

@@ -0,0 +1,255 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &846410004111697396
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6809418524322847815}
m_Layer: 0
m_Name: MaleSocket1
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &6809418524322847815
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 846410004111697396}
serializedVersion: 2
m_LocalRotation: {x: -0.5, y: -0.5, z: 0.5, w: -0.5}
m_LocalPosition: {x: -0.0249, y: -0.0201, z: 0.0004}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 9070761514222156572}
m_LocalEulerAnglesHint: {x: -270, y: 0, z: -90}
--- !u!1 &1157775305034889420
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 669914388288028600}
- component: {fileID: 3326025928589534052}
- component: {fileID: 3055859658575305633}
- component: {fileID: 8638843879408219513}
m_Layer: 0
m_Name: Body1
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &669914388288028600
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1157775305034889420}
serializedVersion: 2
m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 10, y: 10, z: 10}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 9070761514222156572}
m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0}
--- !u!33 &3326025928589534052
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1157775305034889420}
m_Mesh: {fileID: 8604045607132181640, guid: 3391117caae0f4704980f79e4353d042, type: 3}
--- !u!23 &3055859658575305633
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1157775305034889420}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RayTracingAccelStructBuildFlagsOverride: 0
m_RayTracingAccelStructBuildFlags: 1
m_SmallMeshCulling: 1
m_ForceMeshLod: -1
m_MeshLodSelectionBias: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 7397659539795428015, guid: 3391117caae0f4704980f79e4353d042, type: 3}
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_GlobalIlluminationMeshLod: 0
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_MaskInteraction: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!65 &8638843879408219513
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1157775305034889420}
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_LayerOverridePriority: 0
m_IsTrigger: 0
m_ProvidesContacts: 0
m_Enabled: 1
serializedVersion: 3
m_Size: {x: 0.0060000014, y: 0.006000002, z: 0.004000001}
m_Center: {x: -0.0020000003, y: 0.0020000006, z: 0.0020000006}
--- !u!1 &2170111422313532261
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7136602692355227156}
m_Layer: 0
m_Name: MaleSocket2
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &7136602692355227156
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2170111422313532261}
serializedVersion: 2
m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068}
m_LocalPosition: {x: -0.0012, y: -0.02004, z: 0.02506}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 9070761514222156572}
m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0}
--- !u!1 &6179327418151690771
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8323787083687447362}
m_Layer: 0
m_Name: FemaleSocket
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &8323787083687447362
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6179327418151690771}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0.38268343, z: 0, w: 0.92387956}
m_LocalPosition: {x: -0.0294, y: -0.0202, z: 0.0306}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 9070761514222156572}
m_LocalEulerAnglesHint: {x: 0, y: 45, z: 0}
--- !u!1 &8675105343656750386
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 9070761514222156572}
- component: {fileID: -6168186220265721152}
m_Layer: 0
m_Name: TriangleHubModule_MMF
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &9070761514222156572
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8675105343656750386}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 20, y: 20, z: 20}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 669914388288028600}
- {fileID: 8323787083687447362}
- {fileID: 6809418524322847815}
- {fileID: 7136602692355227156}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &-6168186220265721152
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8675105343656750386}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 88b5ad85b06fb47ac93dca899676153f, type: 3}
m_Name:
m_EditorClassIdentifier: '::'

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 2748c7e04600640029ca885671ec6d66
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,255 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &1359582472002982618
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6011220920484988972}
- component: {fileID: -3574282061814459875}
m_Layer: 0
m_Name: TriangleHubModule_MMM
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &6011220920484988972
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1359582472002982618}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 20, y: 20, z: 20}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 9089225325295319878}
- {fileID: 6022533245124769196}
- {fileID: 6536188895589835460}
- {fileID: 2750178671996957933}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &-3574282061814459875
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1359582472002982618}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 2cfeb37d023b04c51b94140d88ca98c3, type: 3}
m_Name:
m_EditorClassIdentifier: '::'
--- !u!1 &1686988774109676497
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6022533245124769196}
m_Layer: 0
m_Name: MaleSocket1
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &6022533245124769196
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1686988774109676497}
serializedVersion: 2
m_LocalRotation: {x: 0.18301274, y: -0.6830127, z: 0.6830127, w: 0.18301274}
m_LocalPosition: {x: -0.04379, y: -0.01983, z: 0.02528}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 6011220920484988972}
m_LocalEulerAnglesHint: {x: 90, y: -150, z: 0}
--- !u!1 &4578939476945980058
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6536188895589835460}
m_Layer: 0
m_Name: MaleSocket2
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &6536188895589835460
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4578939476945980058}
serializedVersion: 2
m_LocalRotation: {x: 0.5, y: 0.5, z: -0.5, w: 0.5}
m_LocalPosition: {x: -0.0301, y: -0.0201, z: 0.0008}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 6011220920484988972}
m_LocalEulerAnglesHint: {x: 90, y: 90, z: 0}
--- !u!1 &7814513479612737229
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 9089225325295319878}
- component: {fileID: 3776802690824132999}
- component: {fileID: 1214841820157806948}
- component: {fileID: 297685854225934990}
m_Layer: 0
m_Name: Body1
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &9089225325295319878
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7814513479612737229}
serializedVersion: 2
m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 10, y: 10, z: 10}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 6011220920484988972}
m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0}
--- !u!33 &3776802690824132999
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7814513479612737229}
m_Mesh: {fileID: 8604045607132181640, guid: 659134740ef3f45d2be46c6aec1f3682, type: 3}
--- !u!23 &1214841820157806948
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7814513479612737229}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RayTracingAccelStructBuildFlagsOverride: 0
m_RayTracingAccelStructBuildFlags: 1
m_SmallMeshCulling: 1
m_ForceMeshLod: -1
m_MeshLodSelectionBias: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 7397659539795428015, guid: 659134740ef3f45d2be46c6aec1f3682, type: 3}
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_GlobalIlluminationMeshLod: 0
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_MaskInteraction: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!65 &297685854225934990
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7814513479612737229}
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_LayerOverridePriority: 0
m_IsTrigger: 0
m_ProvidesContacts: 0
m_Enabled: 1
serializedVersion: 3
m_Size: {x: 0.0057071806, y: 0.005996154, z: 0.004000001}
m_Center: {x: -0.0030000005, y: 0.0019980767, z: 0.0020000006}
--- !u!1 &8673038549157016336
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2750178671996957933}
m_Layer: 0
m_Name: MaleSocket3
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &2750178671996957933
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8673038549157016336}
serializedVersion: 2
m_LocalRotation: {x: 0.67437977, y: -0.21263108, z: 0.21263108, w: 0.67437977}
m_LocalPosition: {x: -0.01593, y: -0.01961, z: 0.02736}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 6011220920484988972}
m_LocalEulerAnglesHint: {x: 90, y: -35, z: 0}

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: b87552d1aa0cd4b5c96106c3dffdc572
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -56,7 +56,7 @@ Transform:
m_GameObject: {fileID: 908797085272381567} m_GameObject: {fileID: 908797085272381567}
serializedVersion: 2 serializedVersion: 2
m_LocalRotation: {x: -0, y: 0, z: 0.7071068, w: -0.7071068} m_LocalRotation: {x: -0, y: 0, z: 0.7071068, w: -0.7071068}
m_LocalPosition: {x: -0.02, y: 0, z: 0.02} m_LocalPosition: {x: -0.02, y: -0.0046, z: 0.02}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: [] m_Children: []
@@ -87,7 +87,7 @@ Transform:
m_GameObject: {fileID: 3261303101102666895} m_GameObject: {fileID: 3261303101102666895}
serializedVersion: 2 serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0.7071068, w: 0.7071068} m_LocalRotation: {x: 0, y: 0, z: 0.7071068, w: 0.7071068}
m_LocalPosition: {x: -0.02, y: 0.04, z: 0.02} m_LocalPosition: {x: -0.02, y: 0.0439, z: 0.02}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: [] m_Children: []
@@ -118,7 +118,7 @@ Transform:
m_GameObject: {fileID: 3625850589448981915} m_GameObject: {fileID: 3625850589448981915}
serializedVersion: 2 serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 1, w: 0} m_LocalRotation: {x: 0, y: 0, z: 1, w: 0}
m_LocalPosition: {x: -0.04, y: 0.02, z: 0.02} m_LocalPosition: {x: -0.0455, y: 0.02, z: 0.02}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: [] m_Children: []
@@ -214,7 +214,7 @@ PrefabInstance:
m_AddedComponents: m_AddedComponents:
- targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: 78fb54ff1ce8d48b9886d9638992bd2e, type: 3} - targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: 78fb54ff1ce8d48b9886d9638992bd2e, type: 3}
insertIndex: -1 insertIndex: -1
addedObject: {fileID: 402289775238470357} addedObject: {fileID: 9120493990586592008}
- targetCorrespondingSourceObject: {fileID: -1817752537321972114, guid: 78fb54ff1ce8d48b9886d9638992bd2e, type: 3} - targetCorrespondingSourceObject: {fileID: -1817752537321972114, guid: 78fb54ff1ce8d48b9886d9638992bd2e, type: 3}
insertIndex: -1 insertIndex: -1
addedObject: {fileID: 6551029816721060232} addedObject: {fileID: 6551029816721060232}
@@ -229,7 +229,7 @@ GameObject:
m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: 78fb54ff1ce8d48b9886d9638992bd2e, type: 3} m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: 78fb54ff1ce8d48b9886d9638992bd2e, type: 3}
m_PrefabInstance: {fileID: 1191710716976541967} m_PrefabInstance: {fileID: 1191710716976541967}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
--- !u!114 &402289775238470357 --- !u!114 &9120493990586592008
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
@@ -238,9 +238,9 @@ MonoBehaviour:
m_GameObject: {fileID: 2038062744777034846} m_GameObject: {fileID: 2038062744777034846}
m_Enabled: 1 m_Enabled: 1
m_EditorHideFlags: 0 m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 8f2f97cf35ba04c2692842afd44fa995, type: 3} m_Script: {fileID: 11500000, guid: 1165e4f8774c6497799cf8ca9f3be91d, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier: '::'
--- !u!1 &8525249395010203489 stripped --- !u!1 &8525249395010203489 stripped
GameObject: GameObject:
m_CorrespondingSourceObject: {fileID: -1817752537321972114, guid: 78fb54ff1ce8d48b9886d9638992bd2e, type: 3} m_CorrespondingSourceObject: {fileID: -1817752537321972114, guid: 78fb54ff1ce8d48b9886d9638992bd2e, type: 3}

View File

@@ -5,6 +5,8 @@ public abstract class ModuleBase : MonoBehaviour
{ {
public string moduleID { get; set; } = ""; public string moduleID { get; set; } = "";
public double angle { get; set; } = 0; // also optional, for Servo/DC angle public double angle { get; set; } = 0; // also optional, for Servo/DC angle
public abstract string moduleType { get; }
public abstract string moduleName { get; }
public void SendToControlLibrary(string moduleType, float currentAngle) public void SendToControlLibrary(string moduleType, float currentAngle)
{ {

View File

@@ -5,7 +5,10 @@ using UnityEngine;
public class ModuleSpawner : MonoBehaviour public class ModuleSpawner : MonoBehaviour
{ {
public GameObject batteryModulePrefab; public GameObject batteryModulePrefab;
public GameObject hubModulePrefab; public GameObject hubModuleMMMFPrefab;
public GameObject hubModuleMMMMPrefab;
public GameObject triangleHubMMFPrefab;
public GameObject triangleHubMMMPrefab;
public GameObject dcMotorModulePrefab; public GameObject dcMotorModulePrefab;
public GameObject servoBendModulePrefab; public GameObject servoBendModulePrefab;
public GameObject servoStraightModulePrefab; public GameObject servoStraightModulePrefab;
@@ -23,7 +26,7 @@ public class ModuleSpawner : MonoBehaviour
case ModuleType.BATTERY: case ModuleType.BATTERY:
return batteryModulePrefab; return batteryModulePrefab;
case ModuleType.SPLITTER: case ModuleType.SPLITTER:
return hubModulePrefab; return hubModuleMMMFPrefab;
case ModuleType.DC_MOTOR: case ModuleType.DC_MOTOR:
return dcMotorModulePrefab; return dcMotorModulePrefab;
case ModuleType.SERVO_1: case ModuleType.SERVO_1:
@@ -40,6 +43,12 @@ public class ModuleSpawner : MonoBehaviour
return imuSensorModulePrefab; return imuSensorModulePrefab;
case ModuleType.SPEAKER: case ModuleType.SPEAKER:
return speakerModulePrefab; return speakerModulePrefab;
case ModuleType.SPLITTER_2:
return hubModuleMMMMPrefab;
case ModuleType.SPLITTER_3:
return triangleHubMMFPrefab;
case ModuleType.SPLITTER_4:
return triangleHubMMMPrefab;
default: default:
Debug.LogError("Unknown module type: " + type); Debug.LogError("Unknown module type: " + type);
return null; return null;

View File

@@ -4,4 +4,6 @@ using UnityEngine;
public class PowerModule : ModuleBase public class PowerModule : ModuleBase
{ {
public override string moduleType => "Battery";
public override string moduleName => "Power Module";
} }

View File

@@ -1 +1 @@
{"Modules":[{"Id":"battery1","Type":"Battery","Degree":null},{"Id":"servo1","Type":"Servo1","Degree":45},{"Id":"servo2","Type":"Servo2","Degree":60},{"Id":"servo3","Type":"Servo1","Degree":90},{"Id":"servo4","Type":"Servo2","Degree":45},{"Id":"servo5","Type":"Servo1","Degree":120},{"Id":"servo6","Type":"Servo2","Degree":30},{"Id":"endModule","Type":"DC","Degree":null}],"Connections":[{"FromModuleId":"battery1","ToModuleId":"servo1","FromSocket":"MaleSocket","ToSocket":"BodySocket","Orientation":0},{"FromModuleId":"servo1","ToModuleId":"servo2","FromSocket":"MaleSocket","ToSocket":"FemaleSocket","Orientation":90},{"FromModuleId":"servo2","ToModuleId":"servo3","FromSocket":"MaleSocket","ToSocket":"FemaleSocket","Orientation":0},{"FromModuleId":"servo3","ToModuleId":"servo4","FromSocket":"MaleSocket","ToSocket":"FemaleSocket","Orientation":90},{"FromModuleId":"servo4","ToModuleId":"servo5","FromSocket":"MaleSocket","ToSocket":"FemaleSocket","Orientation":0},{"FromModuleId":"servo5","ToModuleId":"servo6","FromSocket":"MaleSocket","ToSocket":"FemaleSocket","Orientation":90},{"FromModuleId":"servo6","ToModuleId":"endModule","FromSocket":"MaleSocket","ToSocket":"FemaleSocket","Orientation":0}]} {"Modules":[{"Id": "splitter1","Type":"Splitter4","Degree":null},{"Id":"battery1","Type":"Battery","Degree":null},{"Id":"servo1","Type":"Servo1","Degree":45},{"Id":"servo2","Type":"Servo2","Degree":60},{"Id":"servo3","Type":"Servo1","Degree":90},{"Id":"servo4","Type":"Servo2","Degree":45},{"Id":"servo5","Type":"Servo1","Degree":120},{"Id":"servo6","Type":"Servo2","Degree":30},{"Id":"endModule","Type":"Distance","Degree":null}],"Connections":[{"FromModuleId":"splitter1","ToModuleId":"battery1","FromSocket":"MaleSocket1","ToSocket":"FemaleSocket","Orientation":0},{"FromModuleId":"battery1","ToModuleId":"servo1","FromSocket":"MaleSocket","ToSocket":"BodySocket","Orientation":0},{"FromModuleId":"servo1","ToModuleId":"servo2","FromSocket":"MaleSocket","ToSocket":"FemaleSocket","Orientation":90},{"FromModuleId":"servo2","ToModuleId":"servo3","FromSocket":"MaleSocket","ToSocket":"FemaleSocket","Orientation":0},{"FromModuleId":"servo3","ToModuleId":"servo4","FromSocket":"MaleSocket","ToSocket":"FemaleSocket","Orientation":90},{"FromModuleId":"servo4","ToModuleId":"servo5","FromSocket":"MaleSocket","ToSocket":"FemaleSocket","Orientation":0},{"FromModuleId":"servo5","ToModuleId":"servo6","FromSocket":"MaleSocket","ToSocket":"FemaleSocket","Orientation":90},{"FromModuleId":"servo6","ToModuleId":"endModule","FromSocket":"MaleSocket","ToSocket":"FemaleSocket","Orientation":0}]}

View File

@@ -8644,7 +8644,10 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
batteryModulePrefab: {fileID: 5681477249120589453, guid: 2d0654bf410fb459196f824c861fff6b, type: 3} batteryModulePrefab: {fileID: 5681477249120589453, guid: 2d0654bf410fb459196f824c861fff6b, type: 3}
hubModulePrefab: {fileID: 2038062744777034846, guid: 2e29377717f1046f2b6b15656dd58cc2, type: 3} hubModuleMMMFPrefab: {fileID: 2038062744777034846, guid: 2e29377717f1046f2b6b15656dd58cc2, type: 3}
hubModuleMMMMPrefab: {fileID: 6210873077440843193, guid: 56513ce62d2504919b218e5c1c59b7fe, type: 3}
triangleHubMMFPrefab: {fileID: 8675105343656750386, guid: 2748c7e04600640029ca885671ec6d66, type: 3}
triangleHubMMMPrefab: {fileID: 1359582472002982618, guid: b87552d1aa0cd4b5c96106c3dffdc572, type: 3}
dcMotorModulePrefab: {fileID: 7364692261245862742, guid: 6ffe98828f23843f4814a5dc44baaf85, type: 3} dcMotorModulePrefab: {fileID: 7364692261245862742, guid: 6ffe98828f23843f4814a5dc44baaf85, type: 3}
servoBendModulePrefab: {fileID: 2587764185522029205, guid: 5c6ff9c85cb0b4e54a56a4714e2245e7, type: 3} servoBendModulePrefab: {fileID: 2587764185522029205, guid: 5c6ff9c85cb0b4e54a56a4714e2245e7, type: 3}
servoStraightModulePrefab: {fileID: 6867075298355049526, guid: 3059d52069ecc4a25b965d348837f129, type: 3} servoStraightModulePrefab: {fileID: 6867075298355049526, guid: 3059d52069ecc4a25b965d348837f129, type: 3}

View File

@@ -2,6 +2,8 @@ using UnityEngine;
public class ServoBendModule : ServoMotorModule public class ServoBendModule : ServoMotorModule
{ {
public override string servoType => "Servo1"; public override string servoType => "Servo1";
public override string moduleType => "Servo1";
public override string moduleName => "Servo Bend Module";
void Start() void Start()
{ {

View File

@@ -2,6 +2,8 @@ using UnityEngine;
public class ServoStraightModule : ServoMotorModule public class ServoStraightModule : ServoMotorModule
{ {
public override string servoType => "Servo2"; public override string servoType => "Servo2";
public override string moduleType => "Servo2";
public override string moduleName => "Servo Straight Module";
// public float currentAngle = 90f; // public float currentAngle = 90f;

View File

@@ -8,6 +8,8 @@ public class SpeakerModule : ModuleBase
public string audioFilePath = ""; public string audioFilePath = "";
public string audioFileName = ""; public string audioFileName = "";
public byte[] audioBytes; public byte[] audioBytes;
public override string moduleType => "Speaker";
public override string moduleName => "Speaker Module";
// Called by UI after user picks a file // Called by UI after user picks a file
public void SetAudioFile(string path) public void SetAudioFile(string path)

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,7 @@
using UnityEngine;
public class TriangleHubModule_MMF : HubModule
{
public override string moduleType => "TriangleHubMMF";
public override string moduleName => "Triangle Hub Module MMF";
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 88b5ad85b06fb47ac93dca899676153f

View File

@@ -0,0 +1,7 @@
using UnityEngine;
public class TriangleHubModule_MMM : HubModule
{
public override string moduleType => "TriangleHubMMM";
public override string moduleName => "Triangle Hub Module MMM";
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 2cfeb37d023b04c51b94140d88ca98c3