Advertisement
ciacho152

SpawnTriggerScript

Dec 12th, 2013
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.38 KB | None | 0 0
  1. using UnityEngine;
  2. using System.Collections;
  3.  
  4. public class SpawnTriggerScript : MonoBehaviour {
  5.    
  6.     public SpawnScript spawnScript;
  7.  
  8.     // Use this for initialization
  9.     void Start () {
  10.    
  11.     }
  12.    
  13.     // Update is called once per frame
  14.     void Update () {
  15.    
  16.     }
  17.    
  18.     void OnTriggerEnter(Collider other)
  19.     {
  20.         if (other.gameObject.name=="Player")
  21.         {
  22.             spawnScript.Spawn();
  23.         }
  24.     }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement