public void EnterShip(CrunkMover cm) { m_AudioSource.Play(); cm.crunk.TriggerAirlockAnimation(false); cm.GetComponent <Rigidbody>().position = transform.position; cm.ApplyExternalForce(-m_AirlockForce * m_GoThroughAirlockVector.forward); cm.setGrounded(true); cm.crunk.parentShip = m_ShipImAttachedTo.GetComponent <Ship>(); }
public void LeaveShip(CrunkMover cm) { m_AudioSource.Play(); cm.crunk.TriggerAirlockAnimation(true); cm.GetComponent <Rigidbody>().position = transform.position + (m_PositionOffset * m_GoThroughAirlockVector.forward); cm.ApplyExternalForce(m_AirlockForce * m_GoThroughAirlockVector.forward); cm.setGrounded(false); cm.crunk.parentShip = null; }