Advertisement
Guest User

Untitled

a guest
Aug 24th, 2016
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. public float left;
  2.  
  3. public GameObject enemyLeft;
  4.  
  5. void Start ()
  6. {
  7. enemyLeft= GameObject.Find("Enemy Left");
  8. }
  9.  
  10. void Update()
  11. {
  12. if (transform.position.x <= left)
  13. {
  14. Destroy (enemyLeft);
  15. }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement