i want to make it so depending on the blocktype, it takes multiple collisions to destroy without making a new script. heres what ive got on the block code.
using UnityEngine;
using System.Collections;
public class Block : MonoBehaviour {
public BlockType blockType = BlockType.Wood;
// Use this for initialization
void Start () {
MeshRenderer mr = GetComponent<MeshRenderer>();
mr.material = Resources.Load ( "Materials/block" + blockType.ToString() + " mat" ) as Material;
}
void OnCollisionEnter( Collision col ) {
Score.score += (int)blockType;
Destroy( gameObject );
}
}
public enum BlockType {
Wood = 10,
Stone = 25,
Brick = 50
}