Пример #1
0
        public void OnTriggerEnter(Collider other)
        {
            VoxelBomb bomb = this.gameObject.GetComponent <VoxelBomb>();

            if (bomb != null)
            {
                bomb.triggered = true;
            }
        }
Пример #2
0
        public void OnCollisionEnter(Collision collision)
        {
            Debug.Log("On collision enter");
            VoxelBomb bomb = this.gameObject.GetComponent <VoxelBomb>();

            if (bomb != null)
            {
                bomb.triggered = true;
            }
        }
Пример #3
0
 // 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;
         }
     }
 }