Advertisement
Evilgit

Inventory script

Jun 16th, 2013
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.46 KB | None | 0 0
  1. using UnityEngine;
  2. using System.Collections;
  3.  
  4. public class Inventory : MonoBehaviour
  5. {
  6.    
  7.     public static int charge = 0; //static variables are not shown in the Inspector
  8.     public AudioClip collectSound;
  9.    
  10.     // Use this for initialization
  11.     void Start ()
  12.     {
  13.         charge = 0;
  14.     }
  15.    
  16.     // Update is called once per frame
  17.     void Update ()
  18.     {
  19.    
  20.     }
  21.    
  22.     void Cellpickup()
  23.     {
  24.         AudioSource.PlayClipAtPoint(collectSound, transform.position);
  25.         charge++;
  26.     }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement