Files
Zombie/Assets/_Zombie/Scripts/Data/GunInfo.cs
2025-08-28 10:44:46 +08:00

40 lines
730 B
C#

using static XPlugin.Data.JsonLiteDB.JsonLiteDB;
public enum GunType
{
Pistol = 0,
FireGun = 1,
LaserGun = 2,
LightSphereGun = 3,
BeamGun = 4,
GrenadeGun = 5,
}
public class GunInfo
{
public int ID;
public int Type;
public string Name;
public string CN_Name;
public int Lvl;
public float Recoil;
public float ShootRate;
public GunInfo(TableReader table)
{
ID = table["ID"].OptInt();
Type = table["Type"].OptInt();
Name = table["Name"].OptString();
CN_Name = table["CN_Name"].OptString();
Lvl = table["Lvl"].OptInt();
Recoil = table["Recoil"].OptFloat();
ShootRate = table["ShootRate"].OptFloat();
}
}