示例#1
0
 public static void SendCharacterCameraMovementID(EMovementID movementID)
 {
     if (userCamera.CameraCharacterNotifyOnMovement != null)
     {
         userCamera.CameraCharacterNotifyOnMovement(movementID);
     }
 }
示例#2
0
 public LandState(float landingTime, bool concurrentCanRun,
                  ref IMovementAndMeleeCombatLogic controller, ref IMove move, EMovementID currentID)
 {
     this.landingTime         = landingTime;
     this.concurrentCanRun    = concurrentCanRun;
     this.controller          = controller;
     this.currentID           = currentID;
     this.characterController = move;
 }
示例#3
0
 //TODO: movementInfo for the speed
 public WalkState(bool concurrentCanRun, float movementSpeed, ref IMove characterController,
                  ref IMovementAndMeleeCombatLogic input, EMovementID currentID, ref Animator animator)
 {
     this.concurrentCanRun    = concurrentCanRun;
     this.characterController = characterController;
     this.controller          = input;
     this.currentID           = currentID;
     this.movementSpeed       = movementSpeed;
     this.animator            = animator;
 }
示例#4
0
 public FallState(float lastMoveMultiplier, Vector3 fallVector, bool concurrentCanRun, ref IMove characterController,
                  ref IMovementAndMeleeCombatLogic controller, EMovementID currentID, ref Animator animator)
 {
     this.lastMoveMultiplier  = lastMoveMultiplier;
     this.gravityVector       = fallVector;
     this.concurrentCanRun    = concurrentCanRun;
     this.characterController = characterController;
     this.controller          = controller;
     this.currentID           = currentID;
     this.animator            = animator;
 }
示例#5
0
 //TODO: movementInfo for the speed
 public SmashState(bool concurrentCanRun, float movementSpeed, float smashTime,
                   ref IMove characterController, ref IMovementAndMeleeCombatLogic input, EMovementID currentID, ref Animator animator)
 {
     this.concurrentCanRun    = concurrentCanRun;
     this.characterController = characterController;
     this.controller          = input;
     this.currentID           = currentID;
     this.movementSpeed       = movementSpeed;
     this.smashTime           = smashTime;
     this.isTimeOver          = false;
     this.borderTime          = smashTime / 1.1f;
     this.animator            = animator;
 }
示例#6
0
    public void Update(float time)
    {
        animator.SetFloat(posXHash, controller.InputInfo.MovementPosX, dampTime, time);
        animator.SetFloat(posYHash, controller.InputInfo.MovementPosY, dampTime, time);
        animator.SetBool(isMovingHash, isMoving);

        if (controller.InputInfo.MovementPosX == 0 && controller.InputInfo.MovementPosY == 0)
        {
            isMoving       = false;
            this.currentID = EMovementID.Idle;
            return;
        }
        else
        {
            this.currentID = EMovementID.Walking;
            isMoving       = true;
            characterController.Move(controller.InputInfo.MovementPosX, controller.InputInfo.MovementPosY, movementSpeed, time);
        }
    }
示例#7
0
    public void SetPosition(EMovementID placeMarker)
    {
        if (isZooming)
        {
            return;
        }
        switch (placeMarker)
        {
        case EMovementID.Walking:
            this.cameraSettings  = currentView.BasicView.CameraOption;
            this.currentLocalPos = currentView.BasicView.OnePosition.localPosition;
            break;

        case EMovementID.Running:
            this.cameraSettings  = currentView.RunView.CameraOption;
            this.currentLocalPos = currentView.RunView.OnePosition.localPosition;
            break;

        default:
            break;
        }
    }