Esempio n. 1
0
 private void OnCollisionEnter2D(Collision2D collision)
 {
     if (collision.collider.gameObject.GetComponent <DisShader>())
     {
         targetEffect = collision.collider.gameObject.GetComponent <DisShader>();
         if (targetEffect != null)
         {
             didHit = true;
             point  = collision.GetContact(0).point;
             targetEffect.Reset();
         }
     }
 }
Esempio n. 2
0
 private void Start()
 {
     disValue = GetComponent <DisShader>();
     lg       = transform.root.GetComponent <LevelGenerator>();
 }