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()); } } }
public override void Progressbar_WeaponBronEvent(WeaponAttri weapon) { if (weapon.BarNode == "missile_cd" && _weapAttri == null) { AttachToWeap(weapon); SetProgressBar(); } }
protected void RemoveFromWeap() { _weapAttri = null; }
protected void AttachToWeap(WeaponAttri weapon) { _weapAttri = weapon; }
public virtual void Progressbar_WeaponBronEvent(WeaponAttri weapon) { }
public virtual bool CanFire(WeaponAttri attri) { return(true); }
public override bool CanFire(WeaponAttri attri) { return(attri.Duration == 0); }