Advertisement
Guest User

No Intersection Mod

a guest
Jul 21st, 2015
270
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.05 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.IO;
  7. using UnityEngine;
  8.  
  9. namespace meta
  10. {
  11.     public class Mod : MonoBehaviour
  12.  
  13.     {
  14.         void Start() {
  15.            
  16.         }
  17.  
  18.         void Update ()
  19.         {
  20.             if (Input.GetKeyDown ("p")) {
  21.                 /**foreach (Transform Ghost in FindObjectOfType<AddPiece> ().ghosts) {
  22.                     Ghost.collider.enabled = false;
  23.                 }**/
  24.                 /**
  25.                 foreach (MyBlockInfo Block in FindObjectsOfType<MyBlockInfo>() as MyBlockInfo[]) {
  26.                     try {
  27.                         Block.GetComponentInChildren<MeshCollider> ().isTrigger = true;
  28.                     } catch {
  29.  
  30.                     }
  31.                     try {
  32.                         Block.GetComponentInChildren<Collider> ().isTrigger = true;
  33.                     } catch {
  34.  
  35.                     }
  36.                 }**/
  37.  
  38.             }
  39.             //Debug.Log(FindObjectOfType<GhostTrigger>().gameObject.name);
  40.             foreach (GhostTrigger Ghost in FindObjectsOfType<GhostTrigger>() as GhostTrigger[]) {
  41.                 //Ghost.touchingCount=0;
  42.                 Ghost.OnDisable();
  43.                 //Debug.Log(Ghost.name+"'s touching count is: "+ Ghost.touchingCount.ToString());
  44.             }
  45.         }
  46.     }
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement