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