示例#1
0
 public void CmdToggleLightSwitch(GameObject switchObj)
 {
     Lighting.LightSwitchTrigger s = switchObj.GetComponent <Lighting.LightSwitchTrigger>();
     if (s.isOn)
     {
         s.isOn = false;
     }
     else
     {
         s.isOn = true;
     }
 }
示例#2
0
 public void CmdToggleLightSwitch(GameObject switchObj)
 {
     Lighting.LightSwitchTrigger s = switchObj.GetComponent <Lighting.LightSwitchTrigger>();
     s.isOn = !s.isOn;
 }