Esempio n. 1
0
            public void RollBack(Path newPath)
            {
                if (PathState == PathState.None)
                    return;

                switch (PathState)
                {
                    case PathState.ObjectAdded:
                        newPath.RemoveCelestialBody(CelestialBody);
                        CelestialBody.FakeHasGravitationalTurret = false;
                        break;
                    case PathState.ObjectRemoved:
                        newPath.AddCelestialBody(CelestialBody, false);
                        break;
                    case PathState.ObjectUpgraded:
                        CelestialBody.FakeHasGravitationalTurretLv2 = false;
                        break;
                }


                CelestialBody = null;
                PathState = PathState.None;
            }
Esempio n. 2
0
            public void ChangeState(PathState state, Path newPath, CelestialBody cb)
            {
                CelestialBody = cb;
                PathState = state;

                switch (state)
                {
                    case PathState.ObjectAdded:
                        cb.FakeHasGravitationalTurret = true;
                        newPath.AddCelestialBody(cb, true);
                        break;
                    case PathState.ObjectRemoved:
                        newPath.RemoveCelestialBody(cb);
                        break;
                    case PathState.ObjectUpgraded:
                        cb.FakeHasGravitationalTurretLv2 = true;
                        break;
                }
            }