50 lines
1.8 KiB
C#
50 lines
1.8 KiB
C#
using CodeStage.AntiCheat.ObscuredTypes;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class Select_LeafFairy : ProjectileBase
|
|
{
|
|
public override void Set(ProjectileData _data)
|
|
{
|
|
base.Set(_data);
|
|
StartCoroutine(Co_Update());
|
|
}
|
|
|
|
IEnumerator Co_Update()
|
|
{
|
|
Vector3 randomPos = Vector3.up + Vector3.right * 1.5f;
|
|
ObscuredFloat DamageRate = table_selectskill.Ins.Get_Data(eEffect.Select_LeafFairy).ValueBase;
|
|
DamageRate.RandomizeCryptoKey();
|
|
ObscuredInt FairyCount = 1;
|
|
FairyCount.RandomizeCryptoKey();
|
|
while (true)
|
|
{
|
|
yield return new WaitForSeconds(1f);
|
|
|
|
if (FairyCount == 1)
|
|
{
|
|
FairyCount = Get_FairyCount(eEffect.Select_LeafFairy2);
|
|
if (FairyCount > 1)
|
|
FairyCount.RandomizeCryptoKey();
|
|
}
|
|
|
|
for (int i = 0; i < FairyCount; i++)
|
|
{
|
|
var pos = randomPos + Random.insideUnitSphere;
|
|
transform.position = m_ProjecTileData.shooter.Get_Center_position() + pos;
|
|
|
|
var mobs = ActorInfo.Ins.Get_EnemyActors(m_ProjecTileData.shooter.IsEnemy(),
|
|
m_ProjecTileData.shooter.Get_position(), 0f, eAttackType.Physics);
|
|
if (mobs.Count > 0)
|
|
{
|
|
var mob = mobs[Random.Range(0, mobs.Count)];
|
|
//var leafflash = InGameInfo.Ins.Show_Effect(eEffect.LeafFlash, transform.position);
|
|
//leafflash.transform.LookAt(mob.transform);
|
|
//ProjectileInfo.Ins.Shoot_Projectile("LeafBullet", m_ProjectTileData.actor_shooter, mob, DamageRate, transform.position);
|
|
yield return new WaitForSeconds(0.1f);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |