Example #1
0
        public override void FixedUpdate <T>(SnipeState <T> state)
        {
            while (this.bulletsFired < this.shotsToFire && (state.fixedAge / this.fireInterval) >= this.bulletsFired)
            {
                this._recoilMultiplier *= this._recoilMultiplier * this._recoilMultiplier;
                this.FireBullet(state);
            }

            base.FixedUpdate(state);
        }
Example #2
0
        public override void OnEnter <T>(SnipeState <T> state)
        {
            this.shotsToFire   = (Int32)(3 * (1 + state.chargeBoost));
            this._animPlayRate = this.shotsToFire;
            //this._recoilMultiplier = base.recoilMultiplier * 0.;

            base.OnEnter(state);

            this.fireInterval = (this.duration * firingFrac) / (this.shotsToFire + 1);
        }
Example #3
0
        public sealed override void ModifyBullet <T>(ExpandableBulletAttack bullet, SnipeState <T> state, Ray aim)
        {
            base.ModifyBullet(bullet, state, aim);
            var bul = bullet as ExpandableBulletAttack <TData>;

            bul.onHit  = this.onHit;
            bul.onStop = this.onStop;
            bul.data   = this.InitData();
            this.InitBullet(bul, state);
        }
Example #4
0
 public override void InitBullet <T>(ExpandableBulletAttack <RicochetData> bullet, SnipeState <T> state)
 {
     base.InitBullet(bullet, state);
     bullet.damage *= state.reloadBoost;
     bullet.damage *= (1f + state.chargeBoost);
     if (bullet.isCrit)
     {
         bullet.damage *= 1f + (state.chargeBoost / 20f);
     }
 }
Example #5
0
 public override void InitBullet <T>(ExpandableBulletAttack <NoData> bullet, SnipeState <T> state)
 {
     base.InitBullet(bullet, state);
     bullet.damage *= state.reloadBoost;
     bullet.damage *= (1f + Mathf.Sqrt(state.chargeBoost));
 }
Example #6
0
 public override void ModifyBullet <T>(ExpandableBulletAttack bullet, SnipeState <T> state, Ray aimRay)
 {
     base.ModifyBullet(bullet, state, aimRay);
     bullet.damage *= state.reloadBoost;
 }
Example #7
0
 public virtual void InitBullet <T>(ExpandableBulletAttack <TData> bullet, SnipeState <T> state)
     where T : struct, ISniperPrimaryDataProvider
 {
 }