Advertisement
SizilStank

Untitled

Feb 3rd, 2020
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.72 KB | None | 0 0
  1. if (other.gameObject.tag == "RingsPowerUpCollected")
  2.         {
  3.             _audioSource.PlayOneShot(_powerUpClip, _volumeMin);
  4.  
  5.             _ringsIconCounter++;
  6.  
  7.             _ringsIconCounter = Mathf.Clamp(_ringsIconCounter, 0, 3);
  8.  
  9.             switch (_ringsIconCounter)
  10.             {
  11.                 case 1:
  12.                     _ringsActiveIcon1.SetActive(true);
  13.                     break;
  14.                 case 2:
  15.                     _ringsActiveIcon2.SetActive(true);
  16.                     break;
  17.                 case 3:
  18.                     _ringsActiveIcon3.SetActive(true);
  19.                     break;
  20.                 default:
  21.                     Debug.Log("Its okay");
  22.                     break;
  23.             }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement