22 lines
468 B
C#
22 lines
468 B
C#
using DragonLi.Frame;
|
|
using UnityEngine;
|
|
|
|
public class NormalBullet : EnemyBullet
|
|
{
|
|
public bool isLook;
|
|
public override void OnApplyDamage(IDamagable damagable)
|
|
{
|
|
int randomDamage = GetDamage(out var isCriticalHit);
|
|
damagable.ApplyDamage(randomDamage, isCriticalHit, transform);
|
|
}
|
|
|
|
public override void Update()
|
|
{
|
|
base.Update();
|
|
if (isLook)
|
|
{
|
|
transform.LookAt(targetPos);
|
|
}
|
|
}
|
|
}
|