public void Toggle() { if (!toggling) { toggling = true; locked = !locked; Spring1.spring = locked ? 0.0f : baseSpring1; Spring2.spring = locked ? 0.0f : baseSpring2; if (locked) { MyHelperFuncs.StopRigid(Block1); MyHelperFuncs.StopRigid(Block2); } else { MyHelperFuncs.StartRigid(Block1); MyHelperFuncs.StartRigid(Block2); } StartCoroutine(StopToggle(m_time)); } }
public void StopMoving() { MyHelperFuncs.StopRigid(m_myRigidBody); MyHelperFuncs.StartRigid(m_myRigidBody); }