94 lines
3.2 KiB
C#
94 lines
3.2 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class Skill_Flower : ProjectileBase
|
|
{
|
|
[Header("꽃 범위")]
|
|
public float flowerArea = 6f;
|
|
[Header("에어본 시간")]
|
|
public float ccTime = 1f;
|
|
[Header("개화2 독구름 프리팹, 독 지속시간, 간격, 데미지, 발동확률")]
|
|
public string poisoncloud = "Projectile_PosionCloud";
|
|
//public float poisoncloudLiftTime = 5f;
|
|
public float poisonLifeTime = 5f;
|
|
public float poisonDmgGap = 0.5f;
|
|
public float poisonDmg = 0.5f;
|
|
public float poisonRate = 1f;
|
|
ProjectileData pd_poisonCloud;
|
|
|
|
[Header("개화3 작은 꽃 프리팹")]
|
|
public string smallflower = "Projectile_Flower";
|
|
ProjectileData pd_smallflower;
|
|
|
|
public override void Set(ProjectileData _data)
|
|
{
|
|
if (DSUtil.CheckNull(pd_poisonCloud))
|
|
{
|
|
pd_poisonCloud = new ProjectileData
|
|
{
|
|
//LifeTime = poisoncloudLiftTime,
|
|
shooter = _data.shooter,
|
|
e_SkillExtraType = eSkillExtraType.Poison,
|
|
eStartPos = eProjectileStartPos.Custom,
|
|
m_SkillListTableData = new SkillListTableData
|
|
{
|
|
e_SkillExtraType = eSkillExtraType.Poison,
|
|
f_ExtraValue1 = poisonLifeTime,
|
|
f_ExtraValue2 = poisonDmgGap,
|
|
f_ExtraValue3 = poisonDmg,
|
|
f_ExtraValue4 = poisonRate,
|
|
},
|
|
};
|
|
|
|
pd_smallflower = _data.Copy();
|
|
pd_smallflower.eStartPos = eProjectileStartPos.Custom;
|
|
}
|
|
pd_poisonCloud.v3_StartPos = transform.position;
|
|
|
|
_data.eStartPos = eProjectileStartPos.Target;
|
|
base.Set(_data);
|
|
transform.eulerAngles = Vector3.zero;
|
|
StartCoroutine(Co_Update());
|
|
}
|
|
|
|
IEnumerator Co_Update()
|
|
{
|
|
if (IsStep(1))
|
|
{
|
|
flowerArea += Get_AwakenData(1, 1);
|
|
ccTime += Get_AwakenData(1, 2);
|
|
}
|
|
|
|
var enemies = Get_Enemies(transform, flowerArea);
|
|
int airborneCount = 0;
|
|
for (int i = 0; i < enemies.Count; i++)
|
|
{
|
|
if (!enemies[i].IsDead()) ++airborneCount;
|
|
enemies[i].KnockedAirborne(ccTime);
|
|
}
|
|
if (airborneCount >= 20) ServerInfo.Ins.m_ServerData.Add_TitleCondition(66); // 칭호 : 꽃마녀
|
|
yield return new WaitForSeconds(ccTime);
|
|
|
|
enemies = Get_Enemies(transform, flowerArea);
|
|
for (int i = 0; i < enemies.Count; i++)
|
|
enemies[i].Get_Damage(Get_DamageInfo());
|
|
|
|
yield return new WaitForSeconds(1f);
|
|
|
|
if (IsStep(2)) ProjectileInfo.Ins.Shoot_Projectile(poisoncloud, pd_poisonCloud);
|
|
if (IsStep(3))
|
|
{
|
|
var sf_count = Get_AwakenData(3, 1);
|
|
var targetpos = transform.position;
|
|
var dist = 5f;
|
|
for (int i = 0; i < sf_count; i++)
|
|
{
|
|
pd_smallflower.v3_StartPos = DSUtil.RandomVector_Exception_y(targetpos.x - dist, targetpos.x + dist, targetpos.y, targetpos.z - dist, targetpos.z + dist);
|
|
ProjectileInfo.Ins.Shoot_Projectile(smallflower, pd_smallflower);
|
|
}
|
|
}
|
|
|
|
Off();
|
|
}
|
|
} |