Exemplo n.º 1
0
        public TableFireSpeed Get(int id)
        {
            TableFireSpeed data = null;

            _ins.mDict.TryGetValue(id, out data);
            return(data);
        }
Exemplo n.º 2
0
        private void FireOnce()
        {
            var bulletSpeed = TableFireSpeed.Get(D.I.fireSpeedLevel).bulletSpeed;

            mFirePower = D.I.firePower * buffProxy.Effect_FirePower;
            mFireSpeed = D.I.fireSpeed * buffProxy.Effect_FireSpeed;
            mFireSpeed = Mathf.Min(mFireSpeed, CT.table.maxFireSpeed);
            var _bullets = mFireSpeed * Bullet.BULLET_HEIGH / bulletSpeed;

            mFireOnceBullets = Mathf.RoundToInt(_bullets);
            mFireOnceBullets = Mathf.Max(mFireOnceBullets, 1);
            if (_bullets > 1)
            {
                bulletSpeed = Bullet.BULLET_HEIGH * mFireSpeed / mFireOnceBullets;
            }
            mFireOnceDuration = mFireOnceBullets / mFireSpeed;

            for (int i = 0; i < mFireOnceBullets; i++)
            {
                var x      = Bullet.BULLET_WIDTH * (i - (mFireOnceBullets - 1) * 0.5f);
                var bullet = Bullet.Create();
                bullet.Reset(UIUtil.GetUIPos(fireTransform), x, mFirePower, bulletSpeed);
            }
        }
Exemplo n.º 3
0
 public static float FireSpeedUpCost(int fireSpeedLevel)
 {
     return(TableFireSpeed.Get(fireSpeedLevel).upcost);
 }
Exemplo n.º 4
0
 public static float FireSpeed(int fireSpeedLevel)
 {
     return(TableFireSpeed.Get(fireSpeedLevel).fireSpeed);
 }