示例#1
0
 public void Crush(bool v)
 {
     if (isPrimed && v)
     {
         Debug.Log("Crushing");
         hexAnimator.SetTrigger("Crush");
         slam.PlayDelayed(crushTimerDelay);
         crusher.SetCrushable(true);
         isPrimed = false;
     }
 }
示例#2
0
 private void Die()
 {
     triggered = true;
     if (isPillar)
     {
         hexRB.isKinematic = false;
         if (crusher != null)
         {
             crusher.SetCrushable(true);
         }
         SetPillar(false);
         // Destroy( gameObject.GetComponent<MeshCollider>() );
         // Destroy( pillar );
     }
     else
     {
         Destroy(gameObject);
     }
 }