public void Collect()
    {
        ForceFieldBehaviour fieldBehaviour = GameObject.FindObjectOfType <ForceFieldBehaviour>();

        if (fieldBehaviour != null)
        {
            fieldBehaviour.AddCharges(extraCharges);
        }

        Destruct();
    }
Example #2
0
 // Use this for initialization
 void Start()
 {
     forceField = GetComponent <ForceFieldBehaviour> ();
 }