Exemple #1
0
    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;
    }
Exemple #2
0
 private LightTurnOnOffAction CreateTurnOffAction(bool enabled, LightFunction function) => new LightTurnOnOffAction
 {
     Enabled = enabled, LightFunction = function
 };