public void OnCollisionExit(Collision c) { GravitationalObject g = SvenFranksonTools.GetComponentInAllParents <GravitationalObject> (c.collider.gameObject); if (this.land == g) { this.land = null; } }
public void Activate() { Ray hit = new Ray(this.cam.position, this.cam.forward); RaycastHit hitInfo; Physics.Raycast(hit, out hitInfo, 5f); if (hitInfo.collider.GetComponent <MotherShipSeat> () != null) { hitInfo.collider.GetComponent <MotherShipSeat> ().TakeControl(this); } if (SvenFranksonTools.GetComponentInAllParents <AirCraft> (hitInfo.collider.gameObject) != null) { this.TakeAirCraftControl(SvenFranksonTools.GetComponentInAllParents <AirCraft> (hitInfo.collider.gameObject)); } }