Ejemplo n.º 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);
			}
		}
Ejemplo n.º 2
0
		void Start () 
		{
			_rocket = GameObject.FindObjectOfType<A_Rocket>();
			_rocketRB = _rocket.GetComponentInChildren<Rigidbody2D>();
			_gravityBounds = GetComponentInChildren<Renderer>().bounds.size.x * 0.8f * _mass * _boundsMod;
		}
Ejemplo n.º 3
0
		private const float _twoOverFive = 0.4f;		// This is probably completely unnecessary but yolo

		void Awake ()
		{
			_rocket = GameObject.FindObjectOfType<A_Rocket>();
		}
Ejemplo n.º 4
0
		public void WarpOut (Vector2 trajectory, A_Rocket rocket)
		{
			rocket.transform.position = this.transform.position;
			rocket.GetComponent<Rigidbody2D>().velocity = trajectory;
			WormIn.Reset();
		}
Ejemplo n.º 5
0
		void Awake ()
		{
			_mover = GameObject.FindObjectOfType<MoveScene>();
			_rocket = GameObject.FindObjectOfType<A_Rocket>();
		}