주인공 스킬(검의 왈츠) 카메라 이동 기능 추가

This commit is contained in:
NTG_Lenovo 2024-01-29 11:13:30 +09:00
parent 9b36c12f03
commit a1d5864db5
5 changed files with 19 additions and 3 deletions

View File

@ -97,7 +97,7 @@ namespace BlueWaterProject
/***********************************************************************
* Unity Events
***********************************************************************/
***************************************************************m********/
#region Unity Events
private void OnEnable()

View File

@ -40,8 +40,12 @@ namespace BlueWaterProject
var animationLength = stateInfo.length;
animator.speed = animationLength / theWaltzOfTheSword.skillDuration;
intervalTime = stateInfo.length / 6f;
intervalTime = animationLength / 6f;
if (!theWaltzOfTheSword.isMovingCamera)
{
CameraManager.Inst.CombatCamera.SetFollow(null);
}
combatPlayerController.SetUseGravity(false);
combatPlayerController.SetIsTrigger(true);
combatPlayerController.SetIsInvincibility(true);
@ -85,6 +89,11 @@ namespace BlueWaterProject
{
combatPlayerController.Move(theWaltzOfTheSword.SkillInputData.startPosition);
}
if (!theWaltzOfTheSword.isMovingCamera)
{
var userTransform = theWaltzOfTheSword.SkillInputData.playerCollider.transform;
CameraManager.Inst.CombatCamera.SetFollow(userTransform);
}
combatPlayerController.SetIsTrigger(false);
combatPlayerController.SetUseGravity(true);

View File

@ -61,5 +61,10 @@ namespace BlueWaterProject
CameraManager.Inst.MainCam = Camera.main;
}
public void SetFollow(Transform target)
{
BaseCombatCamera.Follow = target;
}
}
}

View File

@ -12,6 +12,7 @@ namespace BlueWaterProject
public bool isHitStop = true;
[ShowIf("@isHitStop")]
public float hitStopDuration = 0.3f;
public bool isMovingCamera = true;
public ParticleSystem readyEffect;
public ParticleSystem hitEffect;

View File

@ -63,6 +63,7 @@ MonoBehaviour:
returnToStartPosition: 0
isHitStop: 1
hitStopDuration: 0.3
isMovingCamera: 0
readyEffect: {fileID: 6066371733532865879, guid: 450f830fa8320cd46b7bc9aeb6e796b4,
type: 3}
hitEffect: {fileID: 6909896828301235070, guid: b1ca28b8904fe0f4484fdb06b8c55086,