Compare commits
4 Commits
6ed9548735
...
b09110f8c1
Author | SHA1 | Date | |
---|---|---|---|
b09110f8c1 | |||
34f63352e2 | |||
7ed35864cb | |||
33e356f678 |
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/[Enemy] PldDog.prefab
(Stored with Git LFS)
BIN
Assets/JYY/Prefabs/[Enemy] PldDog.prefab
(Stored with Git LFS)
Binary file not shown.
@ -5,6 +5,8 @@ using Random = UnityEngine.Random;
|
||||
|
||||
public class CasterDemonController : EnemyController
|
||||
{
|
||||
|
||||
|
||||
// Animation
|
||||
public static readonly int Cast = Animator.StringToHash("Cast");
|
||||
public static readonly int Flee = Animator.StringToHash("Flee");
|
||||
@ -25,6 +27,15 @@ public class CasterDemonController : EnemyController
|
||||
[SerializeField] private GameObject slowFieldWarning;
|
||||
[SerializeField] private GameObject slowFieldEffect;
|
||||
[SerializeField] private GameObject knockbackEffect;
|
||||
|
||||
// SFX
|
||||
[Space(10)]
|
||||
[Header("SFX")]
|
||||
[SerializeField] private AudioClip magicMissileShotSound;
|
||||
[SerializeField] private AudioClip teleportSound;
|
||||
[SerializeField] private AudioClip spinSound;
|
||||
[SerializeField] private AudioClip slowFieldSound;
|
||||
|
||||
private float _knockbackTimer = 10f;
|
||||
private const float KnockBackThresholdTime = 10f;
|
||||
|
||||
@ -197,7 +208,7 @@ public class CasterDemonController : EnemyController
|
||||
// 플레이어 위치를 바라보고
|
||||
transform.LookAt(aimPosition);
|
||||
SetAnimation(MagicMissile);
|
||||
|
||||
SFXPlayer(magicMissileShotSound);
|
||||
// 미사일 생성 및 초기화
|
||||
var missile = Instantiate(
|
||||
magicMissilePrefab,
|
||||
@ -246,6 +257,7 @@ public class CasterDemonController : EnemyController
|
||||
|
||||
aoe.SetEffect(TeleportEffectData, null, null);
|
||||
|
||||
SFXPlayer(teleportSound);
|
||||
// 텔레포트 타겟 위치로 이동
|
||||
Agent.Warp(teleportTargetPosition);
|
||||
SetAnimation(Telepo);
|
||||
@ -270,9 +282,10 @@ public class CasterDemonController : EnemyController
|
||||
// 1. 시전 애니메이션
|
||||
transform.LookAt(aimPosition);
|
||||
SetAnimation(Cast);
|
||||
SFXPlayer(slowFieldSound);
|
||||
|
||||
// 2. 장판 생성과 세팅
|
||||
var fixedPos = new Vector3(aimPosition.x, 0, aimPosition.z);
|
||||
var fixedPos = new Vector3(aimPosition.x, aimPosition.y, aimPosition.z);
|
||||
var warning = Instantiate(chariotWarning, fixedPos, Quaternion.identity).GetComponent<MagicAoEField>();
|
||||
|
||||
warning.SetEffect(SlowFieldEffectData, null, null);
|
||||
@ -285,6 +298,7 @@ public class CasterDemonController : EnemyController
|
||||
{
|
||||
// 시전 애니메이션
|
||||
SetAnimation(Spin);
|
||||
SFXPlayer(spinSound);
|
||||
|
||||
// 넉백 발생
|
||||
var knockback = Instantiate(chariotWarning, transform).GetComponent<MagicAoEField>();
|
||||
@ -293,6 +307,11 @@ public class CasterDemonController : EnemyController
|
||||
yield return Wait.For(1f);
|
||||
}
|
||||
|
||||
private void SFXPlayer(AudioClip clip)
|
||||
{
|
||||
SoundManager.Instance.PlaySFX(clip);
|
||||
}
|
||||
|
||||
#region 유틸리티
|
||||
private void SetSequence(Func<IEnumerator> newSequence)
|
||||
{
|
||||
|
@ -37,6 +37,12 @@ public class PldDogController : EnemyController
|
||||
[SerializeField] private GameObject horizontalWarning;
|
||||
[SerializeField] private GameObject horizontalSlash;
|
||||
|
||||
// SFX
|
||||
[Space(10)]
|
||||
[Header("SFX")]
|
||||
[SerializeField] private AudioClip slashSound;
|
||||
[SerializeField] private AudioClip boomSound;
|
||||
|
||||
private float _patternTimer = 0f;
|
||||
private int _lastPatternIndex = -1;
|
||||
private bool _isPatternRunning = false;
|
||||
@ -110,13 +116,14 @@ public class PldDogController : EnemyController
|
||||
{
|
||||
Debug.Log("BombThrowPattern: 보스가 폭탄을 던집니다.");
|
||||
SetAnimation(BoomShot);
|
||||
SoundManager.Instance.PlaySFX(boomSound);
|
||||
_isPatternRunning = true;
|
||||
Agent.isStopped = true;
|
||||
|
||||
for (int i = 0; i < bombCount; i++)
|
||||
{
|
||||
Vector3 targetPos = TraceTargetTransform.position;
|
||||
targetPos.y = 0.1f; // 지면에 맞춤
|
||||
targetPos.y += 0.1f; // 지면에 맞춤
|
||||
|
||||
var warning = Instantiate(chariotSlashWarning, targetPos, Quaternion.identity);
|
||||
warning.transform.localScale = bombScale;
|
||||
@ -203,6 +210,7 @@ public class PldDogController : EnemyController
|
||||
private void SlashAnimationPlay()
|
||||
{
|
||||
SetAnimation(Slash);
|
||||
SoundManager.Instance.PlaySFX(slashSound);
|
||||
}
|
||||
|
||||
private void PatternClear()
|
||||
|
Loading…
x
Reference in New Issue
Block a user