Exemple #1
0
    private void OnStateChanged(Pin.Args arg0)
    {
        if (!enabled)
        {
            return;
        }

        if (arg0.ThePin.GetState() == Pin.State.Locked)
        {
            _shouldMove = true;

            if (_feedbackParticles)
            {
                _feedbackParticles.Play();
            }
        }
        else
        {
            _shouldMove = false;
            _moveFeedback.localPosition = Vector3.zero;

            if (_feedbackParticles)
            {
                _feedbackParticles.Stop();
            }
        }
    }
Exemple #2
0
 private void OnPinStateChanged(Pin.Args arg0)
 {
     if (arg0.ThePin.GetState() == Pin.State.Locked)
     {
         _curAlpha = 0.5f;
         SetColor();
     }
     else
     {
         _curAlpha = 1.0f;
         SetColor();
     }
 }