Files
MRCS/Assets/_MrCs/Scripts/Bullets/DoubleTubeBullet.cs
2025-11-04 14:51:46 +08:00

30 lines
776 B
C#

using System.Collections;
using System.Collections.Generic;
using DragonLi.Frame;
using Mirror;
using UnityEngine;
public class DoubleTubeBullet : Bullet
{
[Server]
public override void OnSpawn(int ownerIndex, Vector3 recoil, float recoilCount)
{
base.OnSpawn(ownerIndex, recoil, recoilCount);
type = BulletType.QuickBullet;
BulletInfo bulletInfo = GameManager.Ins.BulletInfos[type][1];
damage = bulletInfo.Damage;
deToughness = bulletInfo.DeToughness;
}
public override void OnApplyDamage(IDamagable damagable)
{
damagable.ApplyDamage(damage, ownerIndex, transform);
if (ownerIndex != -1)
{
GameManager.Ins.AddScore(ownerIndex.ToString(), (int)damage);
}
}
}