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

43 lines
1.3 KiB
C#
Raw Permalink Normal View History

2024-12-15 01:39:39 +00:00
using System.Collections;
using UnityEngine;
public class Skill_StraightBurst : ProjectileBase
{
[Header("ij<><C4B3><EFBFBD>Ϳ<EFBFBD><CDBF><EFBFBD> <20>Ÿ<EFBFBD>")]
public float m_distance = 1.5f;
2024-12-17 02:55:39 +00:00
public GameObject[] gos_effect, go_hiteffect;
2024-12-15 01:39:39 +00:00
public override void Set(ProjectileData _data)
{
_data.eStartPos = eProjectileStartPos.Custom;
_data.v3_StartPos = _data.shooter.Get_CenterPositionFoward(m_distance);
2024-12-15 01:39:39 +00:00
base.Set(_data);
LookAt_ShooterFoward();
2024-12-15 01:39:39 +00:00
DSUtil.InActivateGameObjects(gos_effect);
2024-12-17 02:55:39 +00:00
DSUtil.InActivateGameObjects(go_hiteffect);
2024-12-15 01:39:39 +00:00
StartCoroutine(Co_StraightBurst());
}
IEnumerator Co_StraightBurst()
{
int count = 2 + (IsStep(1) ? (int)Get_AwakenData(1, 1) : 0) + (IsStep(3) ? (int)Get_AwakenData(3, 1) : 0);
m_ProjecTileData.e_SkillExtraType = IsStep(2) ? eSkillExtraType.Knockback : eSkillExtraType.None;
2024-12-15 01:39:39 +00:00
for (int i = 0; i < count; i++)
{
gos_effect[i].SetActive(true);
2024-12-17 02:55:39 +00:00
yield return new WaitForSeconds(1.0f);
gos_effect[i].SetActive(false);
2024-12-15 01:39:39 +00:00
var enemies = Get_Enemies(gos_effect[i].transform, 2f);
for (int j = 0; j < enemies.Count; j++)
enemies[j].Get_Damage(Get_DamageInfo());
2024-12-17 02:55:39 +00:00
go_hiteffect[i].SetActive(true);
2024-12-15 01:39:39 +00:00
}
2024-12-17 02:55:39 +00:00
yield return new WaitForSeconds(5f);
2024-12-15 01:39:39 +00:00
Off();
}
}