Files
Loong/Assets/_Loong/Scripts/Bullet/BlackBullet.cs
2025-10-30 10:16:52 +08:00

23 lines
662 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class BlackBullet : Bullet
{
public override void OnSpawn(Vector3 recoil, float recoilCount)
{
base.OnSpawn(recoil, recoilCount);
type = BulletType.BlackBullet;
BulletInfo bulletInfo = GameManager.Ins.BulletInfos[type][1];
damage = bulletInfo.Damage;
deToughness = bulletInfo.DeToughness;
}
public override void OnApplyDamage(Damagable damagable)
{
// 造成伤害
damagable.ApplyDamage(damage, ownerIndex, handlingHit.point, transform);
RigidbodyComponent.velocity = Vector3.zero;
}
}