duck

duck

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