using CodeStage.AntiCheat.ObscuredTypes; using Newtonsoft.Json; using System.Collections.Generic; using System.Linq; using UnityEngine; public enum eSkillType { HpUp, // 생명력 증가 AttackUp, // 공격력 증가 PreviousArrow, // 직전 화살 DiagonalArrow, // 사선 화살 ProjectilePierce, // 투사체 관통 Reflect, // 반사 Knockback, // 넉백 DoubleShot, // 더블샷 Explosion, // 폭파 Stun, // 기절 Bounce, // 튕김 ArrowUpDown, // 상/하 화살 ArrowLeftRight, // 좌/우 화살 ImpactArrow, // 충격 화살 AttackSpeedUp // 공격 속도 증가 } public class SkillTableData : TableDataBase { public eSkillType e_SkillType; public string s_Name, s_Desc, s_Value, s_ExplosionData; public int n_ImageIndex; ObscuredFloat _Value; public float f_Value { get { return _Value; } set { _Value = value; _Value.RandomizeCryptoKey(); } } public float f_ExplosionScale, f_ExplosionScalePerLv, f_ExplosionDmg, f_ExplosionDmgPerLv; } public class table_skill : table_base { public static table_skill Ins; List tableDatas; protected override void Awake() { Ins = this; base.Awake(); } protected override void Start() { tableDatas = JsonConvert.DeserializeObject>(json_last); for (int i = 0; i < tableDatas.Count; i++) { var temp = tableDatas[i]; temp.f_Value = Get_Value(temp.s_Value); if (temp.s_ExplosionData.Contains('^')) { var split = temp.s_ExplosionData.Split('^'); temp.f_ExplosionScale = Get_Value(split[0]); temp.f_ExplosionScalePerLv = Get_Value(split[1]); temp.f_ExplosionDmg = Get_Value(split[2]); temp.f_ExplosionDmgPerLv = Get_Value(split[3]); } } base.Start(); } public List Get_DataList() { return tableDatas; } public SkillTableData Get_Data(eSkillType skillType) { return tableDatas.Find(f => f.e_SkillType == skillType); } public List Get_ThreeDatas() { return tableDatas.OrderBy(_ => Random.value).Take(3).ToList(); } }