void Start() { _scanningFunction = GetComponent <ScanningFunction>(); _grabFunction = GetComponent <ImpulseBeamGrabFunction>(); _lightFunction = GetComponent <LightFunction>(); _scanningFunction.enabled = false; _grabFunction.enabled = false; _lightFunction.enabled = false; GameContext.Instance.Player.OnToolStateChanged += Player_OnToolStateChanged; GameContext.Instance.Player.OnLightStateChanged += Player_OnLightStateChanged; }
private LightTurnOnOffAction CreateTurnOffAction(bool enabled, LightFunction function) => new LightTurnOnOffAction { Enabled = enabled, LightFunction = function };