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

18 lines
554 B
C#
Raw Normal View History

2021-01-06 16:10:11 +01:00
using System;
using DG.Tweening;
using UnityEngine;
[CreateAssetMenu]
public class EnemyAppearBehaviour : BaseBulletBehaviour
{
[SerializeField] private float scaleUpDuration = 0.3f;
[SerializeField] private float scaleUpDelay = 0.2f;
public override void DoBehaviour(Transform bullet, float size, Vector3 pos)
{
bullet.localScale = Vector3.zero;
2021-01-10 15:56:55 +01:00
bullet.localPosition = pos;
2021-01-06 16:10:11 +01:00
DOTween.Sequence()
.Insert(scaleUpDelay, bullet.DOScale(Vector3.one * size, scaleUpDuration).SetEase(Ease.OutQuint));
}
}