Exemplo n.º 1
0
 void OnGoatYell(Event_GoatYell e)
 {
     if (Shaker != null)
     {
         Shaker.ShakeCamera(1, 1);
         Shaker.Decay();
     }
 }
Exemplo n.º 2
0
    void OnGoatYell(Event_GoatYell e)
    {
        var goat     = GameState.Instance.Goat;
        var distance = Mathf.Abs(transform.position.x - goat.transform.position.x);

        if (_active && distance < TurnOffDistance)
        {
            _active = false;
            PlayScareAnimation();
        }
    }