// Use this for initialization void Start() { obj = transform.parent.GetComponent<ObjectScript>(); switch (type) { case BlockType.Steel: obj.toggleGravity(false); break; case BlockType.Wood: //Can be destroyed by hand case BlockType.Stone: //Can be destroyed by bomb //Applying gravity break; } }
// Use this for initialization void Start() { obj = transform.parent.GetComponent <ObjectScript>(); switch (type) { case BlockType.Steel: obj.toggleGravity(false); break; case BlockType.Wood: //Can be destroyed by hand case BlockType.Stone: //Can be destroyed by bomb //Applying gravity break; } }