// 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); } }
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; } }
public void ChangeLight(LightState state) { _lightControl.ChangeState(state); }