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

41 lines
1.2 KiB
C#

using System.Collections;
using UnityEngine;
using UnityEngine.Rendering;
public class Skill_JumpAttack : ProjectileBase
{
public BoxCollider m_boxcollider;
public Transform tf_size;
public override void Set(ProjectileData _data)
{
_data.eStartPos = eProjectileStartPos.Custom;
_data.v3_StartPos = _data.shooter.Get_PositionFoward();
//_data.v3_StartPos.y = 0.01f;
base.Set(_data);
m_boxcollider.size = Vector3.one * 3f;
tf_size.localScale = Vector3.one;
if (IsStep(1))
{
var val = Get_AwakenData(1, 1);
m_boxcollider.size += m_boxcollider.size * val;
tf_size.localScale += tf_size.localScale * val;
}
var dinfo = Get_DamageInfo();
Set_ReduceCoolTime_byStep(2);
_data.e_SkillExtraType = IsStep(3) ? eSkillExtraType.Stun : eSkillExtraType.None;
StartCoroutine(Co_Update(_data.shooter));
}
IEnumerator Co_Update(Actor hitter)
{
m_boxcollider.enabled = true;
yield return null;
yield return null;
m_boxcollider.enabled = false;
OptionInfo.Ins.Set_PCMove(hitter, true);
yield return new WaitForSeconds(4f);
Off(true);
}
}