Files
MRCS/Assets/_MrCs/Scripts/Bullets/BombBullet.cs

25 lines
663 B
C#

using System.Collections;
using System.Collections.Generic;
using DragonLi.Core;
using Mirror;
using UnityEngine;
public class BombBullet : Bullet
{
private int _bombTime;
[Server]
public override void OnSpawn(int ownerIndex, Vector3 recoil, float recoilCount,float time)
{
base.OnSpawn(ownerIndex, recoil, recoilCount,time);
type = GunType.ZhaDanGun;
_bombTime = 3;
GunInfo bulletInfo = GameManager.Ins.GunInfos[type][1];
damage = bulletInfo.Damage;
hit_trigger = true;
CoroutineTaskManager.Instance.WaitSecondTodo(() =>
{
SpawnImpact();
}, _bombTime);
}
}