コード例 #1
0
ファイル: LevelService.cs プロジェクト: conankzhang/fez
        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?();
            })));
        }
コード例 #2
0
ファイル: LevelService.cs プロジェクト: conankzhang/fez
        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?();
            })));
        }