Beispiel #1
0
        public LongRunningAction ChangeLevelToVolume(string levelName, int toVolume, bool asDoor, bool spin, bool trialEnding)
        {
            this.LevelManager.DestinationVolumeId = new int?(toVolume);
            LongRunningAction lra = this.ChangeLevel(levelName, asDoor, spin, trialEnding);

            return(new LongRunningAction((Action)(() =>
            {
                if (lra.OnDispose != null)
                {
                    lra.OnDispose();
                }
                if (ActionTypeExtensions.IsEnteringDoor(this.PlayerManager.Action))
                {
                    return;
                }
                this.LevelManager.DestinationVolumeId = new int?();
            })));
        }
Beispiel #2
0
        public LongRunningAction ChangeToFarAwayLevel(string levelName, int toVolume, bool trialEnding)
        {
            this.LevelManager.DestinationIsFarAway = true;
            this.LevelManager.DestinationVolumeId  = new int?(toVolume);
            LongRunningAction lra = this.ChangeLevel(levelName, true, false, trialEnding);

            return(new LongRunningAction((Action)(() =>
            {
                if (lra.OnDispose != null)
                {
                    lra.OnDispose();
                }
                this.LevelManager.DestinationIsFarAway = false;
                if (ActionTypeExtensions.IsEnteringDoor(this.PlayerManager.Action))
                {
                    return;
                }
                this.LevelManager.DestinationVolumeId = new int?();
            })));
        }