Lusif 스킬2
This commit is contained in:
parent
c69d008345
commit
f683730b35
File diff suppressed because one or more lines are too long
Binary file not shown.
|
|
@ -9,7 +9,7 @@ GameObject:
|
|||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4291032260640870}
|
||||
- component: {fileID: 5936599011564841456}
|
||||
- component: {fileID: 9159077197857078145}
|
||||
- component: {fileID: 199989270669818508}
|
||||
- component: {fileID: 198124848721414164}
|
||||
- component: {fileID: 108014936755814536}
|
||||
|
|
@ -43,7 +43,7 @@ Transform:
|
|||
- {fileID: 4573346287034178}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &5936599011564841456
|
||||
--- !u!114 &9159077197857078145
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
|
|
@ -52,11 +52,14 @@ MonoBehaviour:
|
|||
m_GameObject: {fileID: 1066843573042574}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: da311ccf9a863044b88c76b898e3e7f3, type: 3}
|
||||
m_Script: {fileID: 11500000, guid: 0cd35b86577a96c4c9f9ddbc2f93dc6f, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Pierce: 0
|
||||
m_HitEffect: 12
|
||||
str_HitEffect: BoomHit
|
||||
m_ShowTimeOverEffect: 1
|
||||
speed: 7
|
||||
homingStrength: 2
|
||||
--- !u!199 &199989270669818508
|
||||
ParticleSystemRenderer:
|
||||
serializedVersion: 6
|
||||
|
|
@ -5001,7 +5004,7 @@ BoxCollider:
|
|||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_LayerOverridePriority: 0
|
||||
m_IsTrigger: 0
|
||||
m_IsTrigger: 1
|
||||
m_ProvidesContacts: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
|
|
|
|||
|
|
@ -4,7 +4,65 @@ using UnityEngine;
|
|||
|
||||
public class Boss_LusifActor : BossMobActor
|
||||
{
|
||||
[Header("스킬2 발동 조건 범위")]
|
||||
public float Skill2Dist = 10f;
|
||||
[Header("스킬2 투사체 갯수")]
|
||||
public int Skill2ProjectileCount = 5;
|
||||
[Header("스킬2 발사 딜레이 시간")]
|
||||
public float Skill2Delay = 0.8f;
|
||||
|
||||
public Transform tf_Attack;
|
||||
int Skill2Count;
|
||||
float Skill2DelayTime;
|
||||
|
||||
public override void On_Regen(bool reincarnation = false, float healrate = 1)
|
||||
{
|
||||
base.On_Regen(reincarnation, healrate);
|
||||
Skill2Count = 0;
|
||||
}
|
||||
|
||||
protected override void Update()
|
||||
{
|
||||
base.Update();
|
||||
if (IsDead()) return;
|
||||
|
||||
//if (CanUseSkill2)
|
||||
{
|
||||
if (Skill2Count == 0 && CoolTime_Skill2 > 0f) CoolTime_Skill2 -= Time.deltaTime;
|
||||
|
||||
if (Skill2Count > 0)
|
||||
{
|
||||
Skill2DelayTime -= Time.deltaTime;
|
||||
if (Skill2DelayTime <= 0f)
|
||||
{
|
||||
Skill2DelayTime = Skill2Delay;
|
||||
--Skill2Count;
|
||||
ProjectileInfo.Ins.Shoot_Projectile(m_MonsterTableData.s_Porjectile2, this, m_Target, 1f, Get_Center_position(),
|
||||
m_MonsterTableData.f_ProjectileLifeTime2);
|
||||
if (Skill2Count == 0)
|
||||
CoolTime_Skill2 = 1.5f;
|
||||
}
|
||||
}
|
||||
else if (isTarget && Vector3.Distance(Get_position(), m_Target.Get_position()) >= Skill2Dist)
|
||||
{
|
||||
if (Skill2Count == 0 && CoolTime_Skill2 <= 0f)
|
||||
{
|
||||
Skill2Count = Skill2ProjectileCount;
|
||||
Skill2DelayTime = Skill2Delay;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void Change_MobStatus(eMobStatus mobStatus)
|
||||
{
|
||||
base.Change_MobStatus(mobStatus);
|
||||
if (MobStatus == eMobStatus.BattleStop)
|
||||
{
|
||||
Skill2Count = 0;
|
||||
CoolTime_Skill2 = 1.5f;
|
||||
}
|
||||
}
|
||||
|
||||
public override void Projectile(string s)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@ public class BossMobActor : MobActor
|
|||
{
|
||||
base.Update();
|
||||
if (IsDead()) return;
|
||||
|
||||
}
|
||||
|
||||
public override void Del_Target(bool forcedel = false)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,39 @@
|
|||
using System.Collections;
|
||||
using UnityEngine;
|
||||
|
||||
public class Projectile_Homing : ProjectileBase
|
||||
{
|
||||
public float speed = 10f; // 기본 속도
|
||||
[Header("유도력(높을수록 강한 유도)")]
|
||||
public float homingStrength = 5f; // 유도력 조절 변수
|
||||
|
||||
public override void Set(ProjectileData _data)
|
||||
{
|
||||
base.Set(_data);
|
||||
StartCoroutine(Co_Update());
|
||||
}
|
||||
|
||||
IEnumerator Co_Update()
|
||||
{
|
||||
while (m_ProjecTileData.LifeTime > 0)
|
||||
{
|
||||
// 목표 방향 계산
|
||||
Vector3 direction = (m_ProjecTileData.target.Get_Center_position() - transform.position).normalized;
|
||||
|
||||
// 현재 방향을 목표 방향으로 보간 (유도력 적용)
|
||||
Vector3 newDirection = Vector3.Lerp(transform.forward, direction, homingStrength * Time.deltaTime).normalized;
|
||||
|
||||
// 새로운 방향으로 이동
|
||||
transform.position += newDirection * speed * Time.deltaTime;
|
||||
|
||||
// 투사체가 이동하는 방향을 바라보도록 회전
|
||||
transform.forward = newDirection;
|
||||
|
||||
yield return null;
|
||||
|
||||
m_ProjecTileData.LifeTime -= Time.deltaTime;
|
||||
}
|
||||
|
||||
Off(true);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 0cd35b86577a96c4c9f9ddbc2f93dc6f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Loading…
Reference in New Issue