52 lines
1.4 KiB
C#
52 lines
1.4 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class GameMangner_TSQ : MonoBehaviour
|
|
{
|
|
public static GameMangner_TSQ instance;
|
|
|
|
public ModbusDeviceController modbusDeviceController;
|
|
|
|
/// <summary>
|
|
/// 三个场景中第一人称
|
|
/// </summary>
|
|
public List<Transform> FirstPersonController;
|
|
/// <summary>
|
|
/// 主场景摄像机
|
|
/// </summary>
|
|
public Camera MainCamera;
|
|
// Start is called before the first frame update
|
|
public void Init()
|
|
{
|
|
|
|
}
|
|
void Awake()
|
|
{
|
|
instance = this;
|
|
}
|
|
void Start()
|
|
{
|
|
Init();
|
|
}
|
|
|
|
public void bengStartOrStop(bool ison)
|
|
{
|
|
modbusDeviceController.ControlRedPipe(ison);
|
|
modbusDeviceController.ControlGreenPipe(ison);
|
|
modbusDeviceController.ControlBluePipe(ison);
|
|
modbusDeviceController.ControlTank(ison);
|
|
modbusDeviceController.ControlLighting(ison);
|
|
}
|
|
public void FengJiStartOrStop(bool ison)
|
|
{
|
|
modbusDeviceController.ControlAirCompressor(ison);
|
|
modbusDeviceController.ControlCabinetLight(ison);
|
|
modbusDeviceController.ControlRedPipeFlow(ison);
|
|
modbusDeviceController.ControlTankUp(ison);
|
|
modbusDeviceController.ControlBluePipeFlow(ison);
|
|
modbusDeviceController.ControlSecondTankLight(ison);
|
|
modbusDeviceController.ControlSecondTurbine(ison);
|
|
}
|
|
}
|