duck

duck

May 10th, 2010
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.17 KB | None | 0 0
  1. if (Physics.Raycast(ray, hit)) {
  2.     if (hit.collider.tag == "Enemy") {
  3.         var enemy : Enemy = hit.collider.GetComponent(Enemy);
  4.         enemy.Kill();  
  5.     }
  6. }
Advertisement
Add Comment
Please, Sign In to add comment