화염 구슬

This commit is contained in:
Ino 2025-05-12 09:46:31 +09:00
parent dc6f32d639
commit 2253da055f
3 changed files with 23 additions and 17 deletions

View File

@ -47,9 +47,7 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
NoUseParticleTime: 1 NoUseParticleTime: 1
OffTime: 1 OffTime: 1
add_offset: {x: 0, y: 0, z: 0}
e_EffectLocation: 0 e_EffectLocation: 0
tf_Target: {fileID: 0}
--- !u!1001 &5233570696502490717 --- !u!1001 &5233570696502490717
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -61,17 +59,17 @@ PrefabInstance:
- target: {fileID: 82855965759615310, guid: adba7694712da2b499b4bc4728de865f, - target: {fileID: 82855965759615310, guid: adba7694712da2b499b4bc4728de865f,
type: 3} type: 3}
propertyPath: m_LocalScale.x propertyPath: m_LocalScale.x
value: 0.2 value: 0.1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 82855965759615310, guid: adba7694712da2b499b4bc4728de865f, - target: {fileID: 82855965759615310, guid: adba7694712da2b499b4bc4728de865f,
type: 3} type: 3}
propertyPath: m_LocalScale.y propertyPath: m_LocalScale.y
value: 0.2 value: 0.1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 82855965759615310, guid: adba7694712da2b499b4bc4728de865f, - target: {fileID: 82855965759615310, guid: adba7694712da2b499b4bc4728de865f,
type: 3} type: 3}
propertyPath: m_LocalScale.z propertyPath: m_LocalScale.z
value: 0.2 value: 0.1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 82855965759615310, guid: adba7694712da2b499b4bc4728de865f, - target: {fileID: 82855965759615310, guid: adba7694712da2b499b4bc4728de865f,
type: 3} type: 3}

View File

@ -46,11 +46,14 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 8822fe9014aa8bd45843a053351a8aa7, type: 3} m_Script: {fileID: 11500000, guid: 8822fe9014aa8bd45843a053351a8aa7, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
ColliderLayer: Actor
m_Pierce: 1 m_Pierce: 1
str_HitEffect: Effect_Hit_Bead str_HitEffect: Effect_Hit_Bead
m_ShowTimeOverEffect: 1
m_Clip: {fileID: 8300000, guid: ce9aaedc8ffe7f34f95fc8f0d331512d, type: 3} m_Clip: {fileID: 8300000, guid: ce9aaedc8ffe7f34f95fc8f0d331512d, type: 3}
m_Collider: {fileID: 1963010064057194592} m_Collider: {fileID: 1963010064057194592}
movespeed: 3 dist: 15
movespeed: 4.5
--- !u!65 &1963010064057194592 --- !u!65 &1963010064057194592
BoxCollider: BoxCollider:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -70,8 +73,8 @@ BoxCollider:
m_ProvidesContacts: 0 m_ProvidesContacts: 0
m_Enabled: 1 m_Enabled: 1
serializedVersion: 3 serializedVersion: 3
m_Size: {x: 0.7, y: 1, z: 0.7} m_Size: {x: 3, y: 3, z: 3}
m_Center: {x: 0.017271176, y: 0.029607713, z: -0.009869218} m_Center: {x: 0, y: 0, z: 0}
--- !u!1001 &1055510018664997146 --- !u!1001 &1055510018664997146
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -88,17 +91,17 @@ PrefabInstance:
- target: {fileID: 6506258205088307131, guid: 60c2ace5e29f85444ab0910a783b3ed8, - target: {fileID: 6506258205088307131, guid: 60c2ace5e29f85444ab0910a783b3ed8,
type: 3} type: 3}
propertyPath: m_LocalScale.x propertyPath: m_LocalScale.x
value: 0.2 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 6506258205088307131, guid: 60c2ace5e29f85444ab0910a783b3ed8, - target: {fileID: 6506258205088307131, guid: 60c2ace5e29f85444ab0910a783b3ed8,
type: 3} type: 3}
propertyPath: m_LocalScale.y propertyPath: m_LocalScale.y
value: 0.2 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 6506258205088307131, guid: 60c2ace5e29f85444ab0910a783b3ed8, - target: {fileID: 6506258205088307131, guid: 60c2ace5e29f85444ab0910a783b3ed8,
type: 3} type: 3}
propertyPath: m_LocalScale.z propertyPath: m_LocalScale.z
value: 0.2 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 6506258205088307131, guid: 60c2ace5e29f85444ab0910a783b3ed8, - target: {fileID: 6506258205088307131, guid: 60c2ace5e29f85444ab0910a783b3ed8,
type: 3} type: 3}

View File

@ -7,6 +7,8 @@ public class Skill_Bead : ProjectileBase
public AudioClip m_Clip; public AudioClip m_Clip;
public BoxCollider m_Collider; public BoxCollider m_Collider;
[Header("도달 거리")]
public float dist = 15f;
[Header("이동속도")] [Header("이동속도")]
public float movespeed = 3f; public float movespeed = 3f;
@ -41,7 +43,7 @@ public class Skill_Bead : ProjectileBase
{ {
// 시작 위치 설정 // 시작 위치 설정
var startPos = m_ProjecTileData.shooter.Get_Center_position(); var startPos = m_ProjecTileData.shooter.Get_Center_position();
var targetPos = startPos + transform.forward * 5f; // 앞으로 이동할 목표 위치 (5 단위) var targetPos = startPos + transform.forward * dist;
float duration = 2f; // 이동 시간 float duration = 2f; // 이동 시간
float elapsed = 0f; // 경과 시간 float elapsed = 0f; // 경과 시간
@ -55,22 +57,25 @@ public class Skill_Bead : ProjectileBase
// 앞으로 이동 // 앞으로 이동
while (elapsed < duration) while (elapsed < duration)
{ {
transform.LookAt(targetPos);
transform.position = Vector3.Lerp(startPos, targetPos, elapsed / duration); transform.position = Vector3.Lerp(startPos, targetPos, elapsed / duration);
elapsed += Time.deltaTime * speed; elapsed += Time.deltaTime * speed;
yield return null; yield return null;
} }
transform.position = targetPos; transform.position = targetPos;
yield return null; //yield return null;
m_Collider.enabled = false; //m_Collider.enabled = false;
yield return null; //yield return null;
m_Collider.enabled = true; //m_Collider.enabled = true;
yield return null; //yield return null;
yield return new WaitForSeconds(0.5f);
// 다시 원래 위치로 이동 // 다시 원래 위치로 이동
elapsed = 0f; elapsed = 0f;
while (elapsed < duration) while (elapsed < duration)
{ {
transform.LookAt(targetPos);
transform.position = Vector3.Lerp(targetPos, startPos, elapsed / duration); transform.position = Vector3.Lerp(targetPos, startPos, elapsed / duration);
elapsed += Time.deltaTime * speed; elapsed += Time.deltaTime * speed;
yield return null; yield return null;