Esempio n. 1
0
 /// <summary>
 /// 检测开关是否打开或者关闭,这个在外面需要实时检测
 /// </summary>
 /// <returns></returns>
 public bool CheckSwitchStateChange()
 {
     if (LabObjectDataFactory.GetSwitchState(LabObjID) != IsOpen)
     {
         LabObjectDataFactory.SetSwitch(LabObjID, IsOpen);
         if (CheckConnect() == true)
         {
             ModifyCirCuit();
         }
         return(true);
     }
     return(false);
 }
Esempio n. 2
0
 void Start()
 {
     LabObjectDataFactory.SetSwitch(LabObjID, false);
 }