using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class G_get : MonoBehaviour {
	public int p_prge=0;
	public int p_Maxprge=1;
	// Use this for initialization
	void Start () {
		
	}
	
	// Update is called once per frame
	void Update () {
		
	}
	void OnCollisionEnter(Collision col){
		if (col.gameObject.tag == "prge") {
			Destroy (col.gameObject);
			p_prge = p_prge + 1;
			if (p_prge == p_Maxprge) {
				p_prge = 0;

			}
		}
	}
}
