This commit is contained in:
CortexCore
2023-07-17 09:59:27 +08:00
parent e27cce2ac3
commit 453754890b
3 changed files with 52 additions and 2 deletions

View File

@@ -0,0 +1,21 @@
using Godot;
using System;
namespace BITFactory;
public partial class 湿 : Node
{
[Export] private string handle;
[Export] private int count;
[Export] private LineEdit _lineEdit;
private void Excute()
{
var myHandle = handle;
if (_lineEdit is not null) myHandle = _lineEdit.Text;
for (var i = 0; i < count; i++)
{
IDIS_Service.Singleton.Register(myHandle, "温度", "float", $"{new Random().Next(10, 60)}", "环境");
IDIS_Service.Singleton.Register(myHandle, "湿度", "float", $"{new Random().Next(0, 100)}", "环境");
}
}
}