示例#1
0
 public void initJump(LChatacterInterface character, LChatacterInformationInterface information)
 {
     curTime = -hitDelta;
     character.CrossFade(animName);
     beginPositon = character.GetCurPosition();
     character.SetCurForward(-MoveDir);
 }
示例#2
0
    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();
    }
示例#3
0
    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();
    }
示例#4
0
 public override void beginAction(LChatacterInterface character, LChatacterInformationInterface information)
 {
     character.CrossFade(animName);
 }
示例#5
0
 public override void beginAction(LChatacterInterface character, LChatacterInformationInterface information)
 {
     //Debug.LogError("begin fall");
     character.CrossFade(animName);
 }