Beispiel #1
0
        protected override void OnDrawOrderedForegroundLayer(IBatchRenderer sbatch)
        {
            DrawCrosshair(sbatch);

            CommonCannonRenderer.DrawLaserCannon_FG(sbatch, Position, Scale, Rotation.ActualValue, Fraction.IsNeutral, CannonHealth.ActualValue, coreRotation, CorePulse.ActualValue, coreImage, Fraction.Color);

            DrawShield(sbatch);
        }
Beispiel #2
0
        protected override void OnDrawOrderedForegroundLayer(IBatchRenderer sbatch)
        {
            DrawCrosshair(sbatch);

            CommonCannonRenderer.DrawShieldCannon_FG(sbatch, Position, Scale, Rotation.ActualValue, Fraction.IsNeutral, CannonHealth.ActualValue, _coreRotation, SatelliteExpansion.ActualValue, Fraction.Color);

            //DrawShield(sbatch);
        }
Beispiel #3
0
        protected override void OnDrawOrderedForegroundLayer(IBatchRenderer sbatch)
        {
            DrawCrosshair(sbatch);

            CommonCannonRenderer.DrawBulletCannon_FG(sbatch, Position, Scale, Rotation.ActualValue, barrelRecoil, cannonCogRotation, CannonHealth.ActualValue, Fraction.Color);

            DrawShield(sbatch);

#if DEBUG
            // ASSERTION
            if (ActiveOperations.Count(p => p is CannonBooster) != BulletBoostCount)
            {
                throw new Exception("Assertion failed TotalBoost == Boosters");
            }
#endif
        }
Beispiel #4
0
        protected override void OnDraw(IBatchRenderer sbatch)
        {
            if (GDOwner.Selection == this)
            {
                sbatch.DrawCentered(Textures.TexPixel, Position, Cannon.CANNON_OUTER_DIAMETER * Scale, Cannon.CANNON_OUTER_DIAMETER * Scale, Color.Black * 0.333f);
            }

            switch (CannonType)
            {
            case CannonStubType.Bullet:
                CommonCannonRenderer.DrawBulletCannon_BG(sbatch, Position, Scale, Rotation, 1);
                break;

            case CannonStubType.Laser:
                CommonCannonRenderer.DrawLaserCannon_BG(sbatch, Position, Scale, Rotation);
                break;

            case CannonStubType.Minigun:
                CommonCannonRenderer.DrawMinigunCannon_BG(sbatch, Position, Scale, Rotation, 1);
                break;

            case CannonStubType.Relay:
                CommonCannonRenderer.DrawRelayCannon_BG(sbatch, Position, Scale, Rotation, 1);
                break;

            case CannonStubType.Shield:
                CommonCannonRenderer.DrawShieldCannon_BG(sbatch, Position, Scale, Rotation);
                break;

            case CannonStubType.Trishot:
                CommonCannonRenderer.DrawTrishotCannon_BG(sbatch, Position, Scale, Rotation, 1);
                break;

            default:
                SAMLog.Error("LECS::EnumSwitch_CS_OD", "CannonType = " + CannonType);
                break;
            }
        }
Beispiel #5
0
 protected override void OnDraw(IBatchRenderer sbatch)
 {
     CommonCannonRenderer.DrawBulletCannon_BG(sbatch, Position, Scale, Rotation.ActualValue, barrelRecoil);
 }
Beispiel #6
0
 protected override void OnDraw(IBatchRenderer sbatch)
 {
     CommonCannonRenderer.DrawLaserCannon_BG(sbatch, Position, Scale, Rotation.ActualValue);
 }
Beispiel #7
0
        protected override void OnDrawOrderedForegroundLayer(IBatchRenderer sbatch)
        {
            switch (CannonType)
            {
            case CannonStubType.Bullet:
                CommonCannonRenderer.DrawBulletCannon_FG(
                    sbatch,
                    Position,
                    Scale,
                    Rotation,
                    1,
                    Lifetime * Cannon.BASE_COG_ROTATION_SPEED,
                    1,
                    Fraction.FRACTION_COLORS[(int)CannonFrac]);
                break;

            case CannonStubType.Laser:
                CommonCannonRenderer.DrawLaserCannon_FG(
                    sbatch,
                    Position,
                    Scale,
                    Rotation,
                    CannonFrac == CannonStubFraction.N0,
                    (CannonFrac == CannonStubFraction.N0 ? 0 : 1),
                    0,
                    1 + FloatMath.Sin(Lifetime * Cannon.CORE_PULSE_FREQ) * Cannon.CORE_PULSE * (CannonFrac == CannonStubFraction.N0 ? 0 : 1),
                    0,
                    Fraction.FRACTION_COLORS[(int)CannonFrac]);
                break;

            case CannonStubType.Minigun:
                CommonCannonRenderer.DrawMinigunCannon_FG(
                    sbatch,
                    Position,
                    Scale,
                    Rotation,
                    1,
                    Lifetime * Cannon.BASE_COG_ROTATION_SPEED,
                    (CannonFrac == CannonStubFraction.N0 ? 0 : 1),
                    Fraction.FRACTION_COLORS[(int)CannonFrac]);
                break;

            case CannonStubType.Relay:
                CommonCannonRenderer.DrawRelayCannon_FG(
                    sbatch,
                    Position,
                    Scale,
                    Rotation,
                    1,
                    Fraction.FRACTION_COLORS[(int)CannonFrac]);
                break;

            case CannonStubType.Shield:
                CommonCannonRenderer.DrawShieldCannon_FG(
                    sbatch,
                    Position,
                    Scale,
                    Rotation,
                    CannonFrac == CannonStubFraction.N0,
                    (CannonFrac == CannonStubFraction.N0 ? 0 : 1),
                    Lifetime * FloatMath.TAU * Cannon.SHIELD_SATELLITE_SPEED,
                    1,
                    Fraction.FRACTION_COLORS[(int)CannonFrac]);
                break;

            case CannonStubType.Trishot:
                CommonCannonRenderer.DrawTrishotCannon_FG(
                    sbatch,
                    Position,
                    Scale,
                    Rotation,
                    1,
                    Lifetime * Cannon.BASE_COG_ROTATION_SPEED,
                    (CannonFrac == CannonStubFraction.N0 ? 0 : 1),
                    Fraction.FRACTION_COLORS[(int)CannonFrac]);
                break;

            default:
                SAMLog.Error("LECS::EnumSwitch_CS_ODOFL", "CannonType = " + CannonType);
                break;
            }
        }