public void OnTriggerEnter(Collider other) { VoxelBomb bomb = this.gameObject.GetComponent <VoxelBomb>(); if (bomb != null) { bomb.triggered = true; } }
public void OnCollisionEnter(Collision collision) { Debug.Log("On collision enter"); VoxelBomb bomb = this.gameObject.GetComponent <VoxelBomb>(); if (bomb != null) { bomb.triggered = true; } }
// Update is called once per frame void Update() { if ((Time.time - this.startedTime) > this.alarmTime) { VoxelMax.VoxelBomb bomb = this.gameObject.GetComponent <VoxelMax.VoxelBomb>(); if (bomb != null) { bomb.triggered = true; } } }