Guest User

Untitled

a guest
Oct 20th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. if (gameIsRunning && coin == null) {
  2. coin = Instantiate (coinPrefab, position, rotation) as GameObject;
  3. }
  4.  
  5. void OnTriggerEnter (Collider col){
  6. if (col.tag == "Player") {
  7. Destroy (this.gameObject);
  8. }
  9. }
Add Comment
Please, Sign In to add comment