Exemple #1
0
 void Update()
 {
     if (platform)
     {
         // Disables the collider if the platform is being move and vice versa
         if (collider)
         {
             collider.enabled = !platform.GetDrag();
         }
         foreach (BoxCollider boxCollid in GetComponentsInChildren <BoxCollider>())
         {
             boxCollid.enabled = !platform.GetDrag();
         }
     }
 }
Exemple #2
0
 void Update()
 {
     if (platform.GetDrag())
     {
         gameObject.layer = 8;
     }
     else
     {
         gameObject.layer = 8;
     }
 }