Commit 0660f5e1 authored by 15김민규's avatar 15김민규

존나 머리굴린 끝에 넉백 시 보는 방향 정립. 그냥 맞을 시 방향 안바뀌는데 디버프나 경직 시 방향 바뀜

parent cd5ff227
...@@ -53,34 +53,6 @@ AnimationClip: ...@@ -53,34 +53,6 @@ AnimationClip:
path: Hitbox path: Hitbox
classID: 61 classID: 61
script: {fileID: 0} script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 1.25
value: 0
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: movementLock
path:
classID: 114
script: {fileID: 11500000, guid: a11d071a77ab21c48882c6c6e4db8f17, type: 3}
m_PPtrCurves: m_PPtrCurves:
- curve: - curve:
- time: 0 - time: 0
...@@ -113,13 +85,6 @@ AnimationClip: ...@@ -113,13 +85,6 @@ AnimationClip:
typeID: 61 typeID: 61
customType: 0 customType: 0
isPPtrCurve: 0 isPPtrCurve: 0
- serializedVersion: 2
path: 0
attribute: 1234365794
script: {fileID: 11500000, guid: a11d071a77ab21c48882c6c6e4db8f17, type: 3}
typeID: 114
customType: 0
isPPtrCurve: 0
- serializedVersion: 2 - serializedVersion: 2
path: 0 path: 0
attribute: 0 attribute: 0
...@@ -192,34 +157,6 @@ AnimationClip: ...@@ -192,34 +157,6 @@ AnimationClip:
path: Hitbox path: Hitbox
classID: 61 classID: 61
script: {fileID: 0} script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 1.25
value: 0
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: movementLock
path:
classID: 114
script: {fileID: 11500000, guid: a11d071a77ab21c48882c6c6e4db8f17, type: 3}
m_EulerEditorCurves: [] m_EulerEditorCurves: []
m_HasGenericRootTransform: 0 m_HasGenericRootTransform: 0
m_HasMotionFloatCurves: 0 m_HasMotionFloatCurves: 0
...@@ -232,10 +169,3 @@ AnimationClip: ...@@ -232,10 +169,3 @@ AnimationClip:
floatParameter: 0 floatParameter: 0
intParameter: 0 intParameter: 0
messageOptions: 0 messageOptions: 0
- time: 1.25
functionName: whileGetHitByAttackAnim
data:
objectReferenceParameter: {fileID: 0}
floatParameter: 0
intParameter: 0
messageOptions: 0
...@@ -71,4 +71,11 @@ AnimationClip: ...@@ -71,4 +71,11 @@ AnimationClip:
m_HasGenericRootTransform: 0 m_HasGenericRootTransform: 0
m_HasMotionFloatCurves: 0 m_HasMotionFloatCurves: 0
m_GenerateMotionCurves: 0 m_GenerateMotionCurves: 0
m_Events: [] m_Events:
- time: 0
functionName: ChangeDir_forAnimation
data:
objectReferenceParameter: {fileID: 0}
floatParameter: 0
intParameter: 0
messageOptions: 0
...@@ -65,4 +65,11 @@ AnimationClip: ...@@ -65,4 +65,11 @@ AnimationClip:
m_HasGenericRootTransform: 0 m_HasGenericRootTransform: 0
m_HasMotionFloatCurves: 0 m_HasMotionFloatCurves: 0
m_GenerateMotionCurves: 0 m_GenerateMotionCurves: 0
m_Events: [] m_Events:
- time: 0
functionName: ChangeDir_forAnimation
data:
objectReferenceParameter: {fileID: 0}
floatParameter: 0
intParameter: 0
messageOptions: 0
...@@ -301,6 +301,7 @@ MonoBehaviour: ...@@ -301,6 +301,7 @@ MonoBehaviour:
- 0.5 - 0.5
movementLock: 0 movementLock: 0
attackRange: 1.2 attackRange: 1.2
rotatable: 1
WallTest: WallTest:
CliffTest: CliffTest:
--- !u!114 &114173716467154830 --- !u!114 &114173716467154830
......
...@@ -6,7 +6,6 @@ using System; ...@@ -6,7 +6,6 @@ using System;
public class EnemyGround : Enemy { public class EnemyGround : Enemy {
public float attackRange; public float attackRange;
public int MoveDir { get; private set; } public int MoveDir { get; private set; }
public bool[] WallTest; public bool[] WallTest;
public bool[] CliffTest; public bool[] CliffTest;
...@@ -94,12 +93,18 @@ public class EnemyGround : Enemy { ...@@ -94,12 +93,18 @@ public class EnemyGround : Enemy {
transform.parent.eulerAngles = ((NumeratedDir)dir == NumeratedDir.Left) ? new Vector2(0, 0) : new Vector2(0, 180); transform.parent.eulerAngles = ((NumeratedDir)dir == NumeratedDir.Left) ? new Vector2(0, 0) : new Vector2(0, 180);
} }
private void ChangeDir_forAnimation()
{
int knockbackDir = (GameManager.Instance.player.transform.position.x - transform.parent.position.x >= 0) ? -1 : 1;
ChangeDir(knockbackDir * -1);
}
// - Knockback coroutine // - Knockback coroutine
protected override IEnumerator Knockback(float knockbackDist, float knockbackTime) protected override IEnumerator Knockback(float knockbackDist, float knockbackTime)
{ {
int knockbackDir = (enemyManager.Player.transform.position.x - transform.parent.position.x >= 0) ? -1 : 1; int knockbackDir = (GameManager.Instance.player.transform.position.x - transform.parent.position.x >= 0) ? -1 : 1;
float knockbackVelocity = knockbackDir * knockbackDist / knockbackTime; float knockbackVelocity = knockbackDir * knockbackDist / knockbackTime;
ChangeDir(knockbackDir * -1); //ChangeDir(knockbackDir * -1);
ChangeVelocityX(knockbackVelocity); ChangeVelocityX(knockbackVelocity);
for (float timer = 0; timer <= knockbackTime; timer += Time.deltaTime) for (float timer = 0; timer <= knockbackTime; timer += Time.deltaTime)
...@@ -122,7 +127,7 @@ public class EnemyGround : Enemy { ...@@ -122,7 +127,7 @@ public class EnemyGround : Enemy {
animator.SetTrigger("StunnedTrigger"); animator.SetTrigger("StunnedTrigger");
animator.speed = stunnedAnimLength / duration; animator.speed = stunnedAnimLength / duration;
yield return new WaitForSeconds(duration); yield return new WaitForSeconds(duration);
OffDebuff(EnemyDebuffCase.Ice); OffDebuff(EnemyDebuffCase.Ice);
} }
protected override IEnumerator OnStun(float duration) protected override IEnumerator OnStun(float duration)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment