public static IEnumerator delayJump(SimpleLeg legOne, SimpleLeg legTwo) { Debug.Log("Delay"); legOne.lift(); legTwo.lift(); while(jumpKeyPressed(false)) { yield return new WaitForFixedUpdate(); } yield return legOne.StartCoroutine(MovementUtility.jump(legOne, legTwo)); }
public static IEnumerator crouch(SimpleLeg legOne, SimpleLeg legTwo) { legOne.lift(); legTwo.lift(); yield return new WaitForFixedUpdate(); }
public static IEnumerator walkOneLeg(SimpleLeg leg1, SimpleLeg leg2) { MovementUtility.checkFeet(leg1, leg2); leg1.lower(); leg2.lift(); while(!leg1.isFullyLowered()) { Debug.DrawLine(leg1.thigh.transform.position, leg1.thigh.transform.position, Color.cyan); leg1.lower(); leg2.lift(); MovementUtility.checkFeet(leg1, leg2); yield return new WaitForFixedUpdate(); } yield return null; }