20 lines
573 B
C#
20 lines
573 B
C#
using UnityEngine;
|
|
|
|
public class Projectile_ChildRotation : ProjectileBase
|
|
{
|
|
public float m_Speed = 50f;
|
|
|
|
private void Update()
|
|
{
|
|
if (!DSUtil.CheckNull(m_ProjecTileData.shooter))
|
|
{
|
|
transform.position = m_ProjecTileData.shooter.Get_Center_position();
|
|
transform.Rotate(Vector3.up * m_Speed * Time.deltaTime); // Y축 기준으로 회전
|
|
m_ProjecTileData.LifeTime -= Time.deltaTime;
|
|
if (m_ProjecTileData.LifeTime <= 0f)
|
|
Off(true);
|
|
}
|
|
else
|
|
Off(true);
|
|
}
|
|
} |