Exemple #1
0
 public void SwitchObject(ClassRoomObjects obj)
 {
     if (obj.CheckOnWorking() && CheckTurnOffСonditions(obj))
     {
         obj.TurnOff();
     }
     else if (!obj.CheckOnWorking() && CheckTurnOnСonditions(obj))
     {
         obj.TurnOn();
     }
 }
Exemple #2
0
 public void SwitchObject(ClassRoomObjects obj)
 {
     if (obj.IsWorking && CheckTurnOffСonditions(obj))
     {
         obj.TurnOff();
     }
     else if (!obj.IsWorking && CheckTurnOnСonditions(obj))
     {
         Debug.Log(2);
         obj.TurnOn();
     }
 }