fix:风机初始化代码提交

This commit is contained in:
zhangjiajia
2026-05-20 17:05:47 +08:00
parent 8510a3dcda
commit 9579356ed1
3752 changed files with 1351544 additions and 1 deletions

View File

@@ -0,0 +1,31 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class ModifySluiceHeightManually : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
//setHeight("sluice1", 1.5f);
//setHeight("sluice2,1.5");
//setHeight("sluice1,1.5");
//Debug.Log("aaaa");
}
// Update is called once per frame
void Update()
{
}
//public void setHeight(string sluiceName,float height)
//{
// transform.Find("Sliders/" + sluiceName).GetComponent<Slider>().value = height;
//}
public void setHeight(string sluiceNameAndHeight)
{
string[] parts = sluiceNameAndHeight.Split(',');
transform.Find("Sliders/" + parts[0]).GetComponent<Slider>().value = float.Parse(parts[1]);
}
}