33 lines
965 B
C#
33 lines
965 B
C#
using UnityEngine;
|
|
|
|
public class Skill_DeathBlade : ProjectileBase
|
|
{
|
|
public GameObject go_dagger;
|
|
|
|
[Header("단검 속도")]
|
|
public float speed = 4f;
|
|
[Header("단검 유지시간")]
|
|
public float lifetime = 4f;
|
|
|
|
public override void Set(ProjectileData _data)
|
|
{
|
|
go_dagger.SetActive(true);
|
|
_data.Speed = speed;
|
|
_data.LifeTime = lifetime;
|
|
_data.eStartPos = eProjectileStartPos.ShooterCenter;
|
|
base.Set(_data);
|
|
StartCoroutine(Co_Move_Strait(eProjectileStrait.Forward));
|
|
|
|
_data.Action_OnHit = hitter =>
|
|
{ // 단검을 맞췄을 경우
|
|
go_dagger.SetActive(false);
|
|
InGameInfo.Ins.Show_Effect("Effect_Teleport", _data.shooter.Get_position());
|
|
_data.shooter.Set_Invisible(1.0f, () =>
|
|
{
|
|
_data.shooter.Set_Warp(_data.target.Get_PositionBack());
|
|
});
|
|
};
|
|
|
|
StartCoroutine(Co_Off(lifetime));
|
|
}
|
|
} |