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

56 lines
2.8 KiB
C#

using CodeStage.AntiCheat.ObscuredTypes;
using Newtonsoft.Json;
using System.Collections.Generic;
public enum eMonsterType { Monster, Boss }
public enum eUnityType { Melee, Range }
public enum eMoveType { Static, Random}
public enum eShieldType { None, Static, Rotation }
public class MonsterTableData : TableDataBase
{
public eMonsterType e_MonsterType;
ObscuredInt _MonsterTypeID; public int n_MonsterTypeID { get { return _MonsterTypeID; } set { _MonsterTypeID = value; _MonsterTypeID.RandomizeCryptoKey(); } }
ObscuredInt _DefaultAttack; public int n_DefaultAttack { get { return _DefaultAttack; } set { _DefaultAttack = value; _DefaultAttack.RandomizeCryptoKey(); } }
ObscuredInt _DefaultHp; public int n_DefaultHp { get { return _DefaultHp; } set { _DefaultHp = value; _DefaultHp.RandomizeCryptoKey(); } }
ObscuredInt _DropExp; public int n_DropExp { get { return _DropExp; } set { _DropExp = value; _DropExp.RandomizeCryptoKey(); } }
public eUnityType e_UnityType;
ObscuredFloat _AttackRange; public float f_AttackRange { get { return _AttackRange; } set { _AttackRange = value; _AttackRange.RandomizeCryptoKey(); } }
ObscuredFloat _AttackDelay; public float f_AttackDelay { get { return _AttackDelay; } set { _AttackDelay = value; _AttackDelay.RandomizeCryptoKey(); } }
ObscuredFloat _MoveSpeed; public float f_MoveSpeed { get { return _MoveSpeed; } set { _MoveSpeed = value; _MoveSpeed.RandomizeCryptoKey(); } }
public eMoveType e_MoveType;
ObscuredInt _ProjectileID; public int n_ProjectileID { get { return _ProjectileID; } set { _ProjectileID = value; _ProjectileID.RandomizeCryptoKey(); } }
public string s_MonsterPrefabPath;
public float f_Scale;
public eShieldType e_ShieldType;
ObscuredInt _NormalShieldCount; public int n_NormalShieldCount { get { return _NormalShieldCount; } set { _NormalShieldCount = value; _NormalShieldCount.RandomizeCryptoKey(); } }
ObscuredInt _InvinityShieldCount; public int n_InvinityShieldCount { get { return _InvinityShieldCount; } set { _InvinityShieldCount = value; _InvinityShieldCount.RandomizeCryptoKey(); } }
}
public class table_monster : table_base
{
public static table_monster Ins;
List<MonsterTableData> tableDatas;
protected override void Awake()
{
Ins = this;
base.Awake();
}
protected override void Start()
{
tableDatas = JsonConvert.DeserializeObject<List<MonsterTableData>>(json_last);
for (int i = 0; i < tableDatas.Count; i++)
{
var temp = tableDatas[i];
temp.s_MonsterPrefabPath = $"Mob/{temp.s_MonsterPrefabPath}";
}
base.Start();
}
public List<MonsterTableData> Get_DataList() { return tableDatas; }
public MonsterTableData Get_Data(int id) { return tableDatas.Find(f => f.n_MonsterTypeID == id); }
}