OneShotOneKill/Assets/Script/Table/Tables/table_projectile.cs

44 lines
2.5 KiB
C#
Raw Normal View History

2026-01-12 06:30:09 +00:00
using CodeStage.AntiCheat.ObscuredTypes;
using Newtonsoft.Json;
using System.Collections.Generic;
public class ProjectileTableData : TableDataBase
{
2026-01-13 00:46:52 +00:00
public string s_ProjectilePrefabs, s_HitEffect;
2026-01-12 06:30:09 +00:00
ObscuredInt _ProjectileID; public int n_ProjectileID { get { return _ProjectileID; } set { _ProjectileID = value; _ProjectileID.RandomizeCryptoKey(); } }
2026-01-13 00:46:52 +00:00
ObscuredInt _AttackBounceLimit; public int n_AttackBounceLimit { get { return _AttackBounceLimit; } set { _AttackBounceLimit = value; _AttackBounceLimit.RandomizeCryptoKey(); } }
2026-01-12 06:30:09 +00:00
ObscuredFloat _ProjectileDistance; public float f_ProjectileDistance { get { return _ProjectileDistance; } set { _ProjectileDistance = value; _ProjectileDistance.RandomizeCryptoKey(); } }
2026-01-13 00:46:52 +00:00
ObscuredFloat _ProjectileSpeed; public float f_ProjectileSpeed { get { return _ProjectileSpeed; } set { _ProjectileSpeed = value; _ProjectileSpeed.RandomizeCryptoKey(); } }
ObscuredInt _ProjectileLife; public int n_ProjectileLife { get { return _ProjectileLife; } set { _ProjectileLife = value; _ProjectileLife.RandomizeCryptoKey(); } }
2026-01-12 06:30:09 +00:00
ObscuredFloat _KnockbackDistance; public float f_KnockbackDistance { get { return _KnockbackDistance; } set { _KnockbackDistance = value; _KnockbackDistance.RandomizeCryptoKey(); } }
ObscuredFloat _StunTime; public float f_StunTime { get { return _StunTime; } set { _StunTime = value; _StunTime.RandomizeCryptoKey(); } }
ObscuredFloat _ExplosionRange; public float f_ExplosionRange { get { return _ExplosionRange; } set { _ExplosionRange = value; _ExplosionRange.RandomizeCryptoKey(); } }
ObscuredFloat _ExplosionDamage; public float f_ExplosionDamage { get { return _ExplosionDamage; } set { _ExplosionDamage = value; _ExplosionDamage.RandomizeCryptoKey(); } }
}
public class table_projectile : table_base
{
public static table_projectile Ins;
List<ProjectileTableData> tableDatas;
protected override void Awake()
{
Ins = this;
base.Awake();
}
protected override void Start()
{
tableDatas = JsonConvert.DeserializeObject<List<ProjectileTableData>>(json_last);
2026-01-13 00:46:52 +00:00
for (int i = 0; i < tableDatas.Count; i++)
{
var temp = tableDatas[i];
temp.s_ProjectilePrefabs = $"Projectile/{temp.s_ProjectilePrefabs}";
}
2026-01-12 06:30:09 +00:00
base.Start();
}
public List<ProjectileTableData> Get_DataList() { return tableDatas; }
public ProjectileTableData Get_Data(int id) { return tableDatas.Find(f => f.n_ProjectileID == id); }
}