주인공 스킬(검의 왈츠) 카메라 이동 기능 추가
This commit is contained in:
parent
9b36c12f03
commit
a1d5864db5
@ -97,7 +97,7 @@ namespace BlueWaterProject
|
|||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* Unity Events
|
* Unity Events
|
||||||
***********************************************************************/
|
***************************************************************m********/
|
||||||
#region Unity Events
|
#region Unity Events
|
||||||
|
|
||||||
private void OnEnable()
|
private void OnEnable()
|
||||||
|
@ -40,8 +40,12 @@ namespace BlueWaterProject
|
|||||||
|
|
||||||
var animationLength = stateInfo.length;
|
var animationLength = stateInfo.length;
|
||||||
animator.speed = animationLength / theWaltzOfTheSword.skillDuration;
|
animator.speed = animationLength / theWaltzOfTheSword.skillDuration;
|
||||||
intervalTime = stateInfo.length / 6f;
|
intervalTime = animationLength / 6f;
|
||||||
|
|
||||||
|
if (!theWaltzOfTheSword.isMovingCamera)
|
||||||
|
{
|
||||||
|
CameraManager.Inst.CombatCamera.SetFollow(null);
|
||||||
|
}
|
||||||
combatPlayerController.SetUseGravity(false);
|
combatPlayerController.SetUseGravity(false);
|
||||||
combatPlayerController.SetIsTrigger(true);
|
combatPlayerController.SetIsTrigger(true);
|
||||||
combatPlayerController.SetIsInvincibility(true);
|
combatPlayerController.SetIsInvincibility(true);
|
||||||
@ -85,6 +89,11 @@ namespace BlueWaterProject
|
|||||||
{
|
{
|
||||||
combatPlayerController.Move(theWaltzOfTheSword.SkillInputData.startPosition);
|
combatPlayerController.Move(theWaltzOfTheSword.SkillInputData.startPosition);
|
||||||
}
|
}
|
||||||
|
if (!theWaltzOfTheSword.isMovingCamera)
|
||||||
|
{
|
||||||
|
var userTransform = theWaltzOfTheSword.SkillInputData.playerCollider.transform;
|
||||||
|
CameraManager.Inst.CombatCamera.SetFollow(userTransform);
|
||||||
|
}
|
||||||
|
|
||||||
combatPlayerController.SetIsTrigger(false);
|
combatPlayerController.SetIsTrigger(false);
|
||||||
combatPlayerController.SetUseGravity(true);
|
combatPlayerController.SetUseGravity(true);
|
||||||
|
@ -61,5 +61,10 @@ namespace BlueWaterProject
|
|||||||
|
|
||||||
CameraManager.Inst.MainCam = Camera.main;
|
CameraManager.Inst.MainCam = Camera.main;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void SetFollow(Transform target)
|
||||||
|
{
|
||||||
|
BaseCombatCamera.Follow = target;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -12,6 +12,7 @@ namespace BlueWaterProject
|
|||||||
public bool isHitStop = true;
|
public bool isHitStop = true;
|
||||||
[ShowIf("@isHitStop")]
|
[ShowIf("@isHitStop")]
|
||||||
public float hitStopDuration = 0.3f;
|
public float hitStopDuration = 0.3f;
|
||||||
|
public bool isMovingCamera = true;
|
||||||
|
|
||||||
public ParticleSystem readyEffect;
|
public ParticleSystem readyEffect;
|
||||||
public ParticleSystem hitEffect;
|
public ParticleSystem hitEffect;
|
||||||
|
@ -63,6 +63,7 @@ MonoBehaviour:
|
|||||||
returnToStartPosition: 0
|
returnToStartPosition: 0
|
||||||
isHitStop: 1
|
isHitStop: 1
|
||||||
hitStopDuration: 0.3
|
hitStopDuration: 0.3
|
||||||
|
isMovingCamera: 0
|
||||||
readyEffect: {fileID: 6066371733532865879, guid: 450f830fa8320cd46b7bc9aeb6e796b4,
|
readyEffect: {fileID: 6066371733532865879, guid: 450f830fa8320cd46b7bc9aeb6e796b4,
|
||||||
type: 3}
|
type: 3}
|
||||||
hitEffect: {fileID: 6909896828301235070, guid: b1ca28b8904fe0f4484fdb06b8c55086,
|
hitEffect: {fileID: 6909896828301235070, guid: b1ca28b8904fe0f4484fdb06b8c55086,
|
||||||
|
Loading…
Reference in New Issue
Block a user