hi i´m using unity 5.4f e the Strat method dont call the variable timesHit from the script.
here my code:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Brick : MonoBehaviour {
public int maxHits;
public int timesHit;
// Use this for initialization
void Start () {
timesHit = 0;
}
// Update is called once per frame
void Update () {
}
void OnCollisionEnter2D (Collision2D col){
timesHit++;
}
}