[fix] 지면 높이에 상관 없이 타겟의 pos를 추적하여 장판 생성
- 장판 y 포지션 동적 할당 - 몬스터 SFX 할당 위치 추가
This commit is contained in:
parent
6ed9548735
commit
33e356f678
@ -5,6 +5,8 @@ using Random = UnityEngine.Random;
|
|||||||
|
|
||||||
public class CasterDemonController : EnemyController
|
public class CasterDemonController : EnemyController
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
// Animation
|
// Animation
|
||||||
public static readonly int Cast = Animator.StringToHash("Cast");
|
public static readonly int Cast = Animator.StringToHash("Cast");
|
||||||
public static readonly int Flee = Animator.StringToHash("Flee");
|
public static readonly int Flee = Animator.StringToHash("Flee");
|
||||||
@ -25,6 +27,15 @@ public class CasterDemonController : EnemyController
|
|||||||
[SerializeField] private GameObject slowFieldWarning;
|
[SerializeField] private GameObject slowFieldWarning;
|
||||||
[SerializeField] private GameObject slowFieldEffect;
|
[SerializeField] private GameObject slowFieldEffect;
|
||||||
[SerializeField] private GameObject knockbackEffect;
|
[SerializeField] private GameObject knockbackEffect;
|
||||||
|
|
||||||
|
// SFX
|
||||||
|
[Space(10)]
|
||||||
|
[Header("SFX")]
|
||||||
|
[SerializeField] private AudioClip magicMissileShotSound;
|
||||||
|
[SerializeField] private AudioClip teleportSound;
|
||||||
|
[SerializeField] private AudioClip spinSound;
|
||||||
|
[SerializeField] private AudioClip circleMagicSound;
|
||||||
|
|
||||||
private float _knockbackTimer = 10f;
|
private float _knockbackTimer = 10f;
|
||||||
private const float KnockBackThresholdTime = 10f;
|
private const float KnockBackThresholdTime = 10f;
|
||||||
|
|
||||||
@ -272,7 +283,7 @@ public class CasterDemonController : EnemyController
|
|||||||
SetAnimation(Cast);
|
SetAnimation(Cast);
|
||||||
|
|
||||||
// 2. 장판 생성과 세팅
|
// 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>();
|
var warning = Instantiate(chariotWarning, fixedPos, Quaternion.identity).GetComponent<MagicAoEField>();
|
||||||
|
|
||||||
warning.SetEffect(SlowFieldEffectData, null, null);
|
warning.SetEffect(SlowFieldEffectData, null, null);
|
||||||
|
@ -37,6 +37,14 @@ public class PldDogController : EnemyController
|
|||||||
[SerializeField] private GameObject horizontalWarning;
|
[SerializeField] private GameObject horizontalWarning;
|
||||||
[SerializeField] private GameObject horizontalSlash;
|
[SerializeField] private GameObject horizontalSlash;
|
||||||
|
|
||||||
|
// SFX
|
||||||
|
[Space(10)]
|
||||||
|
[Header("SFX")]
|
||||||
|
[SerializeField] private AudioClip circleSlashSound;
|
||||||
|
[SerializeField] private AudioClip boomSound;
|
||||||
|
[SerializeField] private AudioClip verticalSlashSound;
|
||||||
|
[SerializeField] private AudioClip horizontalSlashSound;
|
||||||
|
|
||||||
private float _patternTimer = 0f;
|
private float _patternTimer = 0f;
|
||||||
private int _lastPatternIndex = -1;
|
private int _lastPatternIndex = -1;
|
||||||
private bool _isPatternRunning = false;
|
private bool _isPatternRunning = false;
|
||||||
@ -116,7 +124,7 @@ public class PldDogController : EnemyController
|
|||||||
for (int i = 0; i < bombCount; i++)
|
for (int i = 0; i < bombCount; i++)
|
||||||
{
|
{
|
||||||
Vector3 targetPos = TraceTargetTransform.position;
|
Vector3 targetPos = TraceTargetTransform.position;
|
||||||
targetPos.y = 0.1f; // 지면에 맞춤
|
targetPos.y += 0.1f; // 지면에 맞춤
|
||||||
|
|
||||||
var warning = Instantiate(chariotSlashWarning, targetPos, Quaternion.identity);
|
var warning = Instantiate(chariotSlashWarning, targetPos, Quaternion.identity);
|
||||||
warning.transform.localScale = bombScale;
|
warning.transform.localScale = bombScale;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user