void LoadBulletCSV() { Dictionary <UInt32, object> bullet_list = CSVHelper.Instance.GetTable("conf_bullet"); foreach (var items in bullet_list) { conf_bullet bullet_conf = (conf_bullet)items.Value; WeaponAttri _bullet = new WeaponAttri(); _bullet.nID = bullet_conf.NID; //子弹ID _bullet.Name = bullet_conf.Name; //名称 _bullet.CooldownTime = bullet_conf.CooldownTime; //冷却时间 _bullet.AttackDistance = bullet_conf.AttackDistance; //攻击距离 _bullet.Speed = bullet_conf.Speed; //初始飞行速度 _bullet.Damage = bullet_conf.Damage; //攻击伤害 _bullet.ExplodeTime = bullet_conf.ExplodeTime; //爆炸时间 _bullet.BarNode = bullet_conf.BarNode; //cd bar 挂在节点 _Weapons[_bullet.nID] = _bullet; if (!_FireConditions.ContainsKey(_bullet.nID)) { _FireConditions[_bullet.nID] = new List <FireCondition>(); _FireConditions[_bullet.nID].Add(new IsCooldown()); } } }
// Update is called once per frame void Update() { if (!bullet_conf.init) { bullet_conf = (conf_bullet)CSVHelper.Instance.GetItem("conf_bullet", 10001); } if (table == null) { table = CSVHelper.Instance.GetTable("conf_bullet"); } }
void InitFileNames() { fileNameLoad = true; file_conf["conf_bullet"] = new conf_bullet(); }