Reviewed-on: #48 Reviewed-by: Sehyeon <sehyeon1837@gmail.com> Reviewed-by: Lim0_C <dladudcks22@gmail.com>
This commit is contained in:
commit
77c798f9ad
BIN
Assets/JYY/Prefabs/Alien Big Blink.prefab
(Stored with Git LFS)
BIN
Assets/JYY/Prefabs/Alien Big Blink.prefab
(Stored with Git LFS)
Binary file not shown.
BIN
Assets/JYY/Prefabs/Bullets/Magic Missaile.prefab
(Stored with Git LFS)
BIN
Assets/JYY/Prefabs/Bullets/Magic Missaile.prefab
(Stored with Git LFS)
Binary file not shown.
BIN
Assets/JYY/Scenes/MonsterTest.unity
(Stored with Git LFS)
BIN
Assets/JYY/Scenes/MonsterTest.unity
(Stored with Git LFS)
Binary file not shown.
@ -51,9 +51,15 @@ public class BulletBase : MonoBehaviour
|
|||||||
float moveDist = _speed * Time.deltaTime;
|
float moveDist = _speed * Time.deltaTime;
|
||||||
|
|
||||||
// 1) Raycast 충돌 검사
|
// 1) Raycast 충돌 검사
|
||||||
if (Physics.Raycast(_prevPosition, _direction, out RaycastHit hit, moveDist, _targetLayer))
|
if (Physics.SphereCast(
|
||||||
|
_prevPosition,
|
||||||
|
1,
|
||||||
|
_direction,
|
||||||
|
out RaycastHit hit,
|
||||||
|
moveDist,
|
||||||
|
_targetLayer
|
||||||
|
))
|
||||||
{
|
{
|
||||||
// 닿은 지점으로 이동
|
|
||||||
transform.position = hit.point;
|
transform.position = hit.point;
|
||||||
OnBulletHit(hit);
|
OnBulletHit(hit);
|
||||||
return;
|
return;
|
||||||
@ -85,4 +91,11 @@ public class BulletBase : MonoBehaviour
|
|||||||
Debug.Log("## Bullet destroyed");
|
Debug.Log("## Bullet destroyed");
|
||||||
Destroy(gameObject);
|
Destroy(gameObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 기즈모로 반지름 시각화
|
||||||
|
private void OnDrawGizmosSelected()
|
||||||
|
{
|
||||||
|
Gizmos.color = Color.red;
|
||||||
|
Gizmos.DrawWireSphere(transform.position, 1);
|
||||||
|
}
|
||||||
}
|
}
|
@ -277,30 +277,29 @@ public class CasterDemonController : EnemyController
|
|||||||
private IEnumerator SlowFieldSpell()
|
private IEnumerator SlowFieldSpell()
|
||||||
{
|
{
|
||||||
var aimPosition = TargetPosOracle(out var basePos, out var rb);
|
var aimPosition = TargetPosOracle(out var basePos, out var rb);
|
||||||
// 1. 시전 애니메이션
|
|
||||||
transform.LookAt(aimPosition);
|
|
||||||
SetAnimation(Cast);
|
|
||||||
SFXPlayer(slowFieldSound);
|
|
||||||
|
|
||||||
// 2. 장판 생성과 세팅
|
transform.LookAt(aimPosition);
|
||||||
|
|
||||||
|
// 장판 생성과 세팅
|
||||||
var fixedPos = new Vector3(aimPosition.x, aimPosition.y, aimPosition.z);
|
var fixedPos = new Vector3(aimPosition.x, aimPosition.y, aimPosition.z);
|
||||||
var warning = Instantiate(chariotWarning, fixedPos, Quaternion.identity).GetComponent<MagicAoEField>();
|
var warning = Instantiate(chariotWarning, fixedPos, Quaternion.identity).GetComponent<MagicAoEField>();
|
||||||
|
|
||||||
warning.SetEffect(SlowFieldEffectData, null, null);
|
warning.SetEffect(SlowFieldEffectData, () =>
|
||||||
|
{
|
||||||
|
SetAnimation(Cast);
|
||||||
|
SFXPlayer(slowFieldSound);
|
||||||
|
}, null);
|
||||||
|
|
||||||
// 3. 짧은 텀 후 끝내기
|
// 짧은 텀 후 끝내기
|
||||||
yield return Wait.For(1f);
|
yield return Wait.For(1f);
|
||||||
}
|
}
|
||||||
|
|
||||||
private IEnumerator KnockbackSpell()
|
private IEnumerator KnockbackSpell()
|
||||||
{
|
{
|
||||||
// 시전 애니메이션
|
|
||||||
SetAnimation(Spin);
|
|
||||||
SFXPlayer(spinSound);
|
|
||||||
|
|
||||||
// 넉백 발생
|
|
||||||
var knockback = Instantiate(chariotWarning, transform).GetComponent<MagicAoEField>();
|
var knockback = Instantiate(chariotWarning, transform).GetComponent<MagicAoEField>();
|
||||||
knockback.SetEffect(KnockbackData, null, null, DebuffType.Knockback.ToString());
|
knockback.SetEffect(KnockbackData, ()=>{
|
||||||
|
SetAnimation(Spin);
|
||||||
|
SFXPlayer(spinSound);}, null, DebuffType.Knockback.ToString());
|
||||||
|
|
||||||
yield return Wait.For(1f);
|
yield return Wait.For(1f);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user