public void Update() { if (EnemyAISpawnManager.Get().m_TimeToNextSpawnWave > 0f) { this.m_BurningFactor = 0f; return; } bool flag = false; using (List <IFireObject> .Enumerator enumerator = this.m_Firecamps.GetEnumerator()) { while (enumerator.MoveNext()) { if (enumerator.Current.IsBurning()) { flag = true; break; } } } if (flag) { this.m_BurningFactor += Time.deltaTime * FirecampGroupsManager.Get().m_BurningFactorIncreaseSpeed[(int)DifficultySettings.ActivePreset.m_BaseDifficulty]; } else { this.m_BurningFactor -= Time.deltaTime * FirecampGroupsManager.Get().m_BurningFactorDecreaseSpeed[(int)DifficultySettings.ActivePreset.m_BaseDifficulty]; } this.m_BurningFactor = Mathf.Clamp01(this.m_BurningFactor); }
public static void SetupObjects() { SaveGame.m_Objects.Clear(); SaveGame.m_Objects.Add(DifficultySettings.Get()); SaveGame.m_Objects.Add(DialogsManager.Get()); SaveGame.m_Objects.Add(AIManager.Get()); SaveGame.m_Objects.Add(EnemyAISpawnManager.Get()); SaveGame.m_Objects.Add(TriggersManager.Get()); SaveGame.m_Objects.Add(ItemsManager.Get()); SaveGame.m_Objects.Add(SensorManager.Get()); SaveGame.m_Objects.Add(ConstructionGhostManager.Get()); SaveGame.m_Objects.Add(StaticObjectsManager.Get()); SaveGame.m_Objects.Add(Player.Get()); SaveGame.m_Objects.Add(PlayerConditionModule.Get()); SaveGame.m_Objects.Add(PlayerInjuryModule.Get()); SaveGame.m_Objects.Add(PlayerDiseasesModule.Get()); SaveGame.m_Objects.Add(StatsManager.Get()); SaveGame.m_Objects.Add(HintsManager.Get()); SaveGame.m_Objects.Add(ObjectivesManager.Get()); SaveGame.m_Objects.Add(StoryObjectivesManager.Get()); SaveGame.m_Objects.Add(HUDObjectives.Get()); SaveGame.m_Objects.Add(MenuNotepad.Get()); SaveGame.m_Objects.Add(MapTab.Get()); SaveGame.m_Objects.Add(Music.Get()); SaveGame.m_Objects.Add(RainManager.Get()); SaveGame.m_Objects.Add(SleepController.Get()); SaveGame.m_Objects.Add(MainLevel.Instance); SaveGame.m_Objects.Add(ScenarioManager.Get()); SaveGame.m_Objects.Add(InventoryBackpack.Get()); SaveGame.m_Objects.Add(ReplicatedSessionState.Get()); }
private void SpawnAIHallucination() { int count = Mathf.FloorToInt(CJTools.Math.GetProportionalClamp((float)this.m_AIHallucinationsMinCount, (float)this.m_AIHallucinationsMaxCount, (float)this.m_Sanity, (float)this.m_AIHallucinationsSanityLevel, 1f)); this.m_CurrentHallucination = EnemyAISpawnManager.Get().SpawnWave(count, true, null); this.m_LastAIHallucinationTime = Time.time; }
private void Update() { if (this.m_ActiveChallenge != null) { if (!MainLevel.Instance) { this.m_ActiveChallenge = null; this.m_ActiveChallengeName = string.Empty; return; } if (!this.m_HumanAICooldownSet && EnemyAISpawnManager.Get()) { EnemyAISpawnManager.Get().m_GroupSpawnCooldown = 0f; this.m_HumanAICooldownSet = true; } this.m_ActiveChallenge.Update(); } }
public void OnLevelLoaded() { this.m_ChallengeMode = false; this.m_ActiveChallenge = null; this.m_ActiveChallengeName = string.Empty; this.m_Parent = GameObject.FindGameObjectWithTag("Challenges"); if (!this.m_Parent) { return; } if (this.m_ChallengeToActivate == string.Empty) { UnityEngine.Object.Destroy(this.m_Parent); return; } for (int i = 0; i < this.m_Parent.transform.childCount; i++) { this.m_Parent.transform.GetChild(i).gameObject.SetActive(false); } foreach (Challenge challenge in this.m_Challenges) { if (challenge.m_Name == this.m_ChallengeToActivate) { if (!this.m_Parent.transform.Find(challenge.m_ParentName)) { return; } challenge.Activate(this.m_Parent.transform.Find(challenge.m_ParentName).gameObject); this.m_ActiveChallenge = challenge; if (EnemyAISpawnManager.Get()) { EnemyAISpawnManager.Get().m_GroupSpawnCooldown = 0f; this.m_HumanAICooldownSet = true; break; } break; } } this.m_ActiveChallengeName = this.m_ChallengeToActivate; this.m_ChallengeToActivate = string.Empty; this.m_ChallengeMode = true; }