switch from Unity version control to git

This commit is contained in:
Leo Qu
2026-01-07 23:54:53 -05:00
commit a098ec74d9
10166 changed files with 1614580 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
using System.Collections;
using System.Collections.Generic;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
public class DCMotorControlPanel : MonoBehaviour
{
public TMP_InputField degreesInputField;
public TMP_Dropdown directionDropdown;
public Button rotateButton;
private DCMotorModule currentDCModule;
public void Initialize(DCMotorModule DCModule)
{
currentDCModule = DCModule;
gameObject.SetActive(true);
rotateButton.onClick.RemoveAllListeners();
rotateButton.onClick.AddListener(HandleRotateClicked);
}
public void HandleRotateClicked()
{
// Parse degrees
if (!float.TryParse(degreesInputField.text, out float degrees))
{
Debug.LogWarning("Invalid degree input");
return;
}
// Determine direction
int direction = directionDropdown.value == 0 ? 1 : -1;
currentDCModule.Rotate(degrees, direction);
}
public void HidePanel()
{
gameObject.SetActive(false);
}
}