Project_WL/Assets/Script/Character/Projectile/Skill/Skill_DarkAmbush.cs

38 lines
1.7 KiB
C#
Raw Normal View History

2025-05-05 01:43:26 +00:00
using System.Collections;
2025-01-16 21:09:41 +00:00
using UnityEngine;
public class Skill_DarkAmbush : ProjectileBase
{
public Projectile_StopAndColliderControl colliderControl;
public override void Set(ProjectileData _data)
{
2025-05-05 01:43:26 +00:00
_data.eStartPos = eProjectileStartPos.Shooter;
2025-01-16 21:09:41 +00:00
base.Set(_data);
transform.eulerAngles = Vector3.zero;
WL.Combat.Weapon.WLGhostStrike.OnSet(this); // WL #943-⑦ 훅(1줄) — 폭발(Exp_*) 자리마다 PC 공격 자세 실루엣(WLGhostStrike.json) · 원본 진행 · 피해 그대로
2025-05-05 01:43:26 +00:00
StartCoroutine(Co_Update());
}
IEnumerator Co_Update()
{
colliderControl.gameObject.SetActive(false);
colliderControl.Set(m_ProjecTileData);
m_ProjecTileData.shooter.Set_Invisible(1.5f, null);
bool keepCam = WL.Combat.Weapon.WLGhostStrike.KeepCamera(this); // WL #953 PD 「카메라 각도를 바꾸지 말고 현재 상태로 착지」 — 규칙(WLGhostStrike.json keepCamera)이면 탑뷰 전환 생략
if (MyValue.m_RealCamera != null && !keepCam) MyValue.m_RealCamera.Set_TopView(m_ProjecTileData.shooter); // WL #881 섬 RealCamera 없음 가드
2025-05-05 01:43:26 +00:00
yield return new WaitForSeconds(0.25f);
colliderControl.gameObject.SetActive(true);
yield return new WaitForSeconds(1.75f);
if (MyValue.m_RealCamera != null && !keepCam) MyValue.m_RealCamera.Set_TopView(null); // WL #881 섬 RealCamera 없음 가드
2025-05-05 01:43:26 +00:00
Off(true);
2025-01-16 21:09:41 +00:00
}
protected override void Off(bool forceoff = false, bool showtimeovereffect = true)
2025-01-16 21:09:41 +00:00
{
base.Off(forceoff, showtimeovereffect);
2025-02-09 06:50:27 +00:00
if (isProjectiledata && !DSUtil.CheckNull(m_ProjecTileData.shooter))
m_ProjecTileData.shooter.Play_Idle();
2025-01-16 21:09:41 +00:00
}
}