예제 #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);
			}
		}
예제 #2
0
		void Start () 
		{
			_spawnManager = GameObject.FindObjectOfType<SpawnManager>();
		}
예제 #3
0
		public AreaLoader (SpawnManager spawnManager, float offset)
		{
			_spawnManager = spawnManager;
			_offset = offset;
		}