public override void runningCircuits(Delorean delorean, effects worm)
        {
            if (delorean != null)
            {
                Vehicle Deloreancar = delorean.getDelorean();
                #region functions

                #endregion
                int tempspeed = (int)((Deloreancar.Speed / .27777) / 1.60934);
                if (delorean.toggletimecurcuits)
                {
                    worm.wormhole(Deloreancar, tempspeed, delorean.refilltimecurcuits);

                    if (tempspeed > 84)
                    {
                        worm.below84 = true;
                    }
                    if (tempspeed >= 88)
                    {
                        to88(tempspeed, delorean, worm);
                    }
                    else if (tempspeed < 84)
                    {
                        errorbool = false;
                        below88(delorean, worm);
                    }
                }
                else
                {
                    resetTravel(tempspeed, delorean, worm);
                }
            }
        }
        public override void runningCircuits(Delorean delorean, effects worm)
        {
            if (delorean != null)
            {
                Vehicle Deloreancar = delorean.getDelorean();
                int     tempspeed   = (int)((Deloreancar.Speed / .27777) / 1.60934);
                #region functions
                if (Deloreancar.DirtLevel > 0)
                {
                    Deloreancar.DirtLevel -= 0.001f;
                }

                if (Deloreancar.Model == new Model("BTTF3rr"))
                {
                    if (Game.IsKeyPressed(System.Windows.Forms.Keys.W))
                    {
                        if (tempspeed < 45)
                        {
                            Deloreancar.ApplyForceRelative(new Vector3(0, 0.5f, 0));
                        }
                    }
                    if (Game.IsKeyPressed(System.Windows.Forms.Keys.S))
                    {
                        if (tempspeed < 45)
                        {
                            Deloreancar.ApplyForceRelative(new Vector3(0, -0.5f, 0));
                        }
                    }
                    Deloreancar.FuelLevel = 0;
                }
                #endregion

                if (delorean.toggletimecurcuits)
                {
                    displaymodelOnOff(delorean, delorean.toggletimecurcuits);
                    worm.wormhole(Deloreancar, tempspeed, delorean.refilltimecurcuits);
                    if (tempspeed > 64)
                    {
                        worm.below84 = true;
                    }
                    if (tempspeed >= 88)
                    {
                        to88(tempspeed, delorean, worm);
                    }
                    else if (tempspeed < 64)
                    {
                        errorbool = false;
                        below88(delorean, worm);
                    }
                }
                else
                {
                    resetTravel(tempspeed, delorean, worm);
                }
            }
        }
Exemple #3
0
        public override void runningCircuits(Delorean delorean, effects worm)
        {
            if (delorean != null)
            {
                Vehicle Deloreancar = delorean.getDelorean();
                #region functions
                if (timecurcuitssystem.effectProps[Deloreancar.NumberPlate.Trim()].ice.Alpha > 0)
                {
                    timecurcuitssystem.effectProps[Deloreancar.NumberPlate.Trim()].ice.Alpha -= 1;
                }

                if (Deloreancar.Model == new Model("BTTF2") && flyingison)
                {
                    if (Deloreancar.HeightAboveGround > 1)
                    {
                        Deloreancar.ApplyForce(new Vector3(0, 0, 0.17f));
                    }
                    else
                    {
                        flyingison = false;
                    }
                }
                else if (Deloreancar.Model == new Model("BTTF2F"))
                {
                    if (Deloreancar.IsDoorBroken(VehicleDoor.BackLeftDoor) && Deloreancar.IsDoorBroken(VehicleDoor.BackRightDoor))
                    {
                        if (Deloreancar.EngineHealth > 0)
                        {
                            Deloreancar.EngineHealth--;
                        }
                    }
                    else if (Deloreancar.IsDoorBroken(VehicleDoor.BackLeftDoor) || Deloreancar.IsDoorBroken(VehicleDoor.BackRightDoor))
                    {
                        if (Deloreancar.EngineHealth > 500)
                        {
                            Deloreancar.EngineHealth--;
                        }
                        else
                        {
                            Deloreancar.EngineHealth = 500;
                        }
                    }
                    flyingison = true;
                }
                #endregion
                int tempspeed = (int)((Deloreancar.Speed / .27777) / 1.60934);

                if (delorean.toggletimecurcuits)
                {
                    displaymodelOnOff(delorean, delorean.toggletimecurcuits);
                    worm.wormhole(Deloreancar, tempspeed, delorean.refilltimecurcuits);
                    if (tempspeed > 84)
                    {
                        worm.below84 = true;
                    }
                    if (tempspeed >= 88)
                    {
                        to88(tempspeed, delorean, worm);
                    }
                    else if (tempspeed < 84)
                    {
                        errorbool = false;
                        below88(delorean, worm);
                    }
                }
                else
                {
                    resetTravel(tempspeed, delorean, worm);
                }
            }
        }