public void initJump(LChatacterInterface character, LChatacterInformationInterface information) { curTime = -hitDelta; character.CrossFade(animName); beginPositon = character.GetCurPosition(); character.SetCurForward(-MoveDir); }
public void initJump(LChatacterInterface character, LChatacterInformationInterface information) { curTime = 0f; character.CrossFade(animName); //跳跃的方向 Vector3 forward; character.GetForward(out forward); Vector3 left = Vector3.Cross(forward, Vector3.up); MoveDir = (left * VirtualInput.dir.x + forward * VirtualInput.dir.y).normalized; beginPositon = character.GetCurPosition(); }
public void initJump(LChatacterInterface character, LChatacterInformationInterface information) { curTime = 0f; character.CrossFade(animName); Vector3 dir = endPositoin - beginPositon; float length = Vector3.Distance(endPositoin, beginPositon); //跳跃的方向 Vector3 forward = dir; forward.y = 0; forward.Normalize(); character.SetCurForward(forward); JumpTime = length * 0.5f / jumpSpeed; beginPositon = character.GetCurPosition(); }
public override void beginAction(LChatacterInterface character, LChatacterInformationInterface information) { character.CrossFade(animName); }
public override void beginAction(LChatacterInterface character, LChatacterInformationInterface information) { //Debug.LogError("begin fall"); character.CrossFade(animName); }