Merge pull request 'DEG-62 몬스터 폴리싱' (!48) from DEG-62 into main

Reviewed-on: #48
Reviewed-by: Sehyeon <sehyeon1837@gmail.com>
Reviewed-by: Lim0_C <dladudcks22@gmail.com>
This commit is contained in:
FioreFlower 2025-05-13 08:18:33 +00:00
commit 77c798f9ad
5 changed files with 32 additions and 20 deletions

BIN
Assets/JYY/Prefabs/Alien Big Blink.prefab (Stored with Git LFS)

Binary file not shown.

Binary file not shown.

BIN
Assets/JYY/Scenes/MonsterTest.unity (Stored with Git LFS)

Binary file not shown.

View File

@ -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);
}
} }

View File

@ -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);
} }