public static void SendCharacterCameraMovementID(EMovementID movementID) { if (userCamera.CameraCharacterNotifyOnMovement != null) { userCamera.CameraCharacterNotifyOnMovement(movementID); } }
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; }
//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; }
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; }
//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; }
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); } }
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; } }