ジャンプ改善

This commit is contained in:
kimura 2022-07-04 13:13:53 +09:00
parent 4871dbbb40
commit 2d0a1f7bf3
2 changed files with 4 additions and 4 deletions

View File

@ -235,13 +235,13 @@ namespace MyGame.Scenes.MiniGame.Scripts
.Skip(1)
.Subscribe(_ =>
{
player.Move();
// カメラ移動
cameraTransform.position = playerTransform.position.x * Vector3.right + cameraOffset;
if (Input.GetMouseButtonDown(0) || Input.GetKeyDown(KeyCode.Space))
{
player.Jump();
}
player.Move();
// カメラ移動
cameraTransform.position = playerTransform.position.x * Vector3.right + cameraOffset;
}).AddTo(this);
player.OnHitItem.Where(_ => state.Value == GameState.Play).Subscribe(x =>

View File

@ -68,7 +68,7 @@ namespace MyGame.Scenes.MiniGame.Scripts
}
SoundManager.Instance.PlaySE("se_minigame_Jump");
animator?.Play("Brother_pink_jump");
animator?.Play("Brother_pink_jump", 0, 0);
isJump = true;
var lastFrame = jumpAnimationCurve[jumpAnimationCurve.length - 1];
var jumpTime = lastFrame.time * 2;