38 lines
1.3 KiB
C#
38 lines
1.3 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class Skill_CrossSlash : ProjectileBase
|
|
{
|
|
public ProjectileHitChecker[] arr_ProjectileHitChecker; // 베기 이펙트 2종
|
|
public List<float> list_gaptime = new List<float> { 0.25f, 0.4f, 0.35f, 0.425f, 0.45f, 0.45f };
|
|
|
|
public override void Set(ProjectileData _data)
|
|
{
|
|
_data.eStartPos = eProjectileStartPos.ShooterCenter;
|
|
base.Set(_data);
|
|
LookAt_ShooterFoward();
|
|
StartCoroutine(Co_Update());
|
|
}
|
|
|
|
IEnumerator Co_Update()
|
|
{
|
|
for (int i = 0; i < arr_ProjectileHitChecker.Length; i++)
|
|
arr_ProjectileHitChecker[i].gameObject.SetActive(false);
|
|
|
|
m_ProjecTileData.shooter.AnimationPlay("paladin_skill2_start");
|
|
for (int i = 0; i < 6; i++)
|
|
{
|
|
yield return new WaitForSeconds(list_gaptime[i]);
|
|
var index = i % 2;
|
|
arr_ProjectileHitChecker[index].gameObject.SetActive(false);
|
|
arr_ProjectileHitChecker[index].gameObject.SetActive(true);
|
|
arr_ProjectileHitChecker[index].Get_Collider().enabled = true;
|
|
yield return null;
|
|
arr_ProjectileHitChecker[index].Get_Collider().enabled = false;
|
|
}
|
|
|
|
yield return new WaitForSeconds(2f);
|
|
Off(true);
|
|
}
|
|
} |