/Scripts/CollideAndCorrode.js
http://acid-and-base.googlecode.com/ · JavaScript · 10 lines · 10 code · 0 blank · 0 comment · 4 complexity · f8d75a8efd4b21d4a5919d1ba1d34909 MD5 · raw file
- function OnControllerColliderHit(hit : ControllerColliderHit) {
- if(hit.gameObject.name == "CylinderLeft"){
- Debug.Log("Hit CylinderLeft!");
- Destroy(hit.gameObject);
- }
- if(hit.gameObject.name == "CylinderRight"){
- Debug.Log("Hit CylinderRight!");
- Destroy(hit.gameObject);
- }
- }