Beispiel #1
0
		public void Destroy ()
		{
			if (_r == null)
				_r = GameObject.FindObjectOfType<A_Rocket>();
			if (_sm == null)
				_sm = GameObject.FindObjectOfType<SpawnManager>();

			if ((Vector2.Distance (this.transform.position, _r.transform.position)) > _sm.ScreenWidthInWorldUnits * 2.1)
			{
				Destroy(gameObject);
			}
		}
Beispiel #2
0
		void Start () 
		{
			_spawnManager = GameObject.FindObjectOfType<SpawnManager>();
		}
Beispiel #3
0
		public AreaLoader (SpawnManager spawnManager, float offset)
		{
			_spawnManager = spawnManager;
			_offset = offset;
		}