public State GetState() { if (rope != null && rope.GetConnected()) { return(GetComponent <SwingState>()); } else { return(GetComponent <FallingState>()); } }