lucid-super-dream/Assets/Scripts/BulletScaleBehaviour.cs

14 lines
438 B
C#
Raw Normal View History

2021-01-06 16:10:11 +01:00
using DG.Tweening;
using UnityEngine;
[CreateAssetMenu]
public class BulletScaleBehaviour : BaseBulletBehaviour
{
[SerializeField] private float scaleTime = 0.5f;
[SerializeField] private Ease scaleEase = Ease.OutQuint;
public override void DoBehaviour(Transform bullet, float size, Vector3 pos)
{
bullet.localScale = Vector3.zero;
bullet.DOScale(Vector3.one * size, scaleTime).SetEase(scaleEase);
}
}