Example #1
0
 // Fill the jack with a plug
 public bool PlugIn(Plug plug)
 {
     _lightControl.ChangeState(LightState.ON);
     Click();
     if (IsFree)
     {
         _plug = plug;
         _plug.PlugIn(this);
         Debug.Log("Plugged " + _plug + " into " + gameObject.name);
         return(true);
     }
     else
     {
         return(false);
     }
 }
Example #2
0
    public void OnClickLighting(string state)
    {
        switch (state)
        {
        case "Off":
            lightController.ChangeState(LightController.State.Off);
            break;

        case "Daytime":
            lightController.ChangeState(LightController.State.Daytime);
            break;

        case "Night":
            lightController.ChangeState(LightController.State.Night);
            break;

        case "Disco":
            lightController.ChangeState(LightController.State.Disco);
            break;
        }
    }
Example #3
0
 public void ChangeLight(LightState state)
 {
     _lightControl.ChangeState(state);
 }