30 lines
761 B
C#
30 lines
761 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using DragonLi.Frame;
|
|
using Mirror;
|
|
using UnityEngine;
|
|
|
|
public class PistolBullet : Bullet
|
|
{
|
|
[Server]
|
|
public override void OnSpawn(int ownerIndex, Vector3 recoil, float recoilCount)
|
|
{
|
|
base.OnSpawn(ownerIndex, recoil, recoilCount);
|
|
type = BulletType.PistolBullet;
|
|
BulletInfo bulletInfo = GameManager.Ins.BulletInfos[type];
|
|
damage = bulletInfo.Damage;
|
|
deToughness = bulletInfo.DeToughness;
|
|
}
|
|
|
|
public override void OnApplyDamage(IDamagable damagable)
|
|
{
|
|
damagable.ApplyDamage(damage, ownerIndex, transform);
|
|
}
|
|
|
|
[Server]
|
|
public override void OnHitPlayer(int index)
|
|
{
|
|
Debug.Log(index + "玩家受击");
|
|
}
|
|
}
|