コード例 #1
0
 // Token: 0x060007D1 RID: 2001 RVA: 0x0000879A File Offset: 0x0000699A
 public override void Perform(IContext context)
 {
     SaveSlotBackupsManager.ResetBackupDelay();
     InstantLoadScenesController.Instance.LockFinishingLoading = true;
     RandomizerStatsManager.Active = true;
     GameStateMachine.Instance.SetToGame();
     if (!GameController.Instance.SaveGameController.PerformLoad())
     {
     }
 }
コード例 #2
0
 // Token: 0x06001382 RID: 4994
 private void CastSoulFlame()
 {
     if (this.ChargingSound)
     {
         this.ChargingSound.StopAndFadeOut(0.1f);
     }
     this.m_sein.Energy.Spend(this.SoulFlameCost);
     this.m_cooldownRemaining = 1f;
     this.m_holdDownTime      = 0f;
     if (this.m_sein.PlayerAbilities.Regroup.HasAbility)
     {
         this.m_sein.Mortality.Health.GainHealth(4);
     }
     if (this.m_sein.PlayerAbilities.UltraSoulFlame.HasAbility)
     {
         this.m_sein.Mortality.Health.GainHealth(4);
     }
     this.m_sceneCheckpoint = new MoonGuid(Scenes.Manager.CurrentScene.SceneMoonGuid);
     if (this.m_checkpointMarkerGameObject)
     {
         this.m_checkpointMarkerGameObject.GetComponent <SoulFlame>().Disappear();
     }
     this.SpawnSoulFlame(Characters.Sein.Position);
     RandomizerBonusSkill.LastSoulLink = Characters.Sein.Position;
     RandomizerStatsManager.OnSave();
     SeinSoulFlame.OnSoulFlameCast();
     SaveSlotBackupsManager.CreateCurrentBackup();
     GameController.Instance.CreateCheckpoint();
     GameController.Instance.SaveGameController.PerformSave();
     this.m_numberOfSoulFlamesCast++;
     if (this.m_numberOfSoulFlamesCast == 50)
     {
         AchievementsController.AwardAchievement(AchievementsLogic.Instance.SoulLinkManyTimesAchievementAsset);
     }
     if (this.CheckpointSequence)
     {
         this.CheckpointSequence.Perform(null);
     }
 }
コード例 #3
0
    // Token: 0x06001381 RID: 4993 RVA: 0x0006E5C0 File Offset: 0x0006C7C0
    public override void UpdateCharacterState()
    {
        if (this.m_sein.Controller.IsBashing)
        {
            return;
        }
        this.HandleDelayOnGround();
        this.HandleCooldown();
        this.HandleCheckpointMarkerVisibility();
        this.HandleNagging();
        this.HandleSkillTreeHint();
        this.HandleCharging();
        if (this.m_sein.Energy.Max == 0f)
        {
            this.m_cooldownRemaining = 1f;
        }
        if (!UI.Fader.IsFadingInOrStay())
        {
            if (Core.Input.SoulFlame.OnPressed && !Core.Input.SoulFlame.Used && !Core.Input.Cancel.Used)
            {
                this.m_isCasting = true;
                if (this.InsideCheckpointMarker)
                {
                    this.m_tapRemainingTime = 0.3f;
                }
                else if (!this.CanAffordSoulFlame)
                {
                    this.HideOtherMessages();
                    UI.SeinUI.ShakeEnergyOrbBar();
                    this.m_sein.Energy.NotifyOutOfEnergy();
                }
                else if (this.m_cooldownRemaining != 0f)
                {
                    this.HideOtherMessages();
                    this.m_notReadyHint = UI.Hints.Show(this.NotReadyMessage, HintLayer.SoulFlame, 1f);
                    Sound.Play(this.NotReadySound.GetSound(null), base.transform.position, null);
                }
                else if (this.IsSafeToCastSoulFlame != SeinSoulFlame.SoulFlamePlacementSafety.Safe)
                {
                    this.HideOtherMessages();
                    switch (this.IsSafeToCastSoulFlame)
                    {
                    case SeinSoulFlame.SoulFlamePlacementSafety.UnsafeEnemies:
                        this.m_notSafeHint = UI.Hints.Show(this.NotSafeEnemiesMessage, HintLayer.SoulFlame, 1f);
                        break;

                    case SeinSoulFlame.SoulFlamePlacementSafety.UnsafeGround:
                        this.m_notSafeHint = UI.Hints.Show(this.NotSafeGroundMessage, HintLayer.SoulFlame, 1f);
                        break;

                    case SeinSoulFlame.SoulFlamePlacementSafety.UnsafeZone:
                        this.m_notSafeHint = UI.Hints.Show(this.NotSafeZoneMessage, HintLayer.SoulFlame, 1f);
                        break;

                    case SeinSoulFlame.SoulFlamePlacementSafety.SavePedestal:
                        this.m_notSafeHint = UI.Hints.Show(this.SavePedestalZoneMessage, HintLayer.SoulFlame, 1f);
                        break;
                    }
                    Sound.Play(this.NotSafeSound.GetSound(null), base.transform.position, null);
                }
            }
            if (this.m_isCasting && this.m_sein.IsOnGround && this.m_delayOnGround == 0f && this.m_tapRemainingTime > 0f)
            {
                this.m_tapRemainingTime -= Time.deltaTime;
                if (this.m_tapRemainingTime < 0f && this.InsideCheckpointMarker && Characters.Sein.PlayerAbilities.Rekindle.HasAbility && this.IsSafeToCastSoulFlame == SeinSoulFlame.SoulFlamePlacementSafety.Safe)
                {
                    SeinSoulFlame.OnSoulFlameCast();
                    Vector3 position = Characters.Sein.Position;
                    Characters.Sein.Position = this.m_soulFlame.Position;
                    SaveSlotBackupsManager.CreateCurrentBackup();
                    GameController.Instance.CreateCheckpoint();
                    Characters.Sein.Position = position;
                    GameController.Instance.SaveGameController.PerformSave();
                    this.m_soulFlame.OnRekindle();
                    GameController.Instance.PerformSaveGameSequence();
                }
            }
            if (Core.Input.SoulFlame.Released)
            {
                this.m_isCasting = false;
                if (this.m_tapRemainingTime > 0f)
                {
                    this.m_tapRemainingTime = 0f;
                    if (this.AllowedToAccessSkillTree && this.InsideCheckpointMarker)
                    {
                        if (this.m_skillTreeHint)
                        {
                            this.m_skillTreeHint.Visibility.HideImmediately();
                        }
                        Core.Input.Start.Used = true;
                        UI.Menu.ShowSkillTree();
                    }
                }
            }
        }
        else
        {
            this.m_tapRemainingTime = 0f;
        }
        if (this.m_holdDownTime == 1f && this.m_sein.IsOnGround && this.m_delayOnGround == 0f)
        {
            this.CastSoulFlame();
        }
    }