private void OnUpdate() { if (!this._isCoolTime || Mathf.Approximately(Time.get_timeScale(), 0.0f) || !Singleton <Manager.Map> .IsInstance()) { return; } EnvironmentSimulator simulator = Singleton <Manager.Map> .Instance.Simulator; if (Object.op_Equality((Object)simulator, (Object)null) || !simulator.EnabledTimeProgression || !Singleton <Game> .IsInstance()) { return; } Dictionary <int, float> pointCoolTimeTable = Singleton <Game> .Instance.Environment?.DropSearchActionPointCoolTimeTable; if (pointCoolTimeTable == null) { return; } float num1; if (!pointCoolTimeTable.TryGetValue(this.RegisterID, out num1)) { this.SetAvailable(); } else { float unscaledDeltaTime = Time.get_unscaledDeltaTime(); this._coolTime = Mathf.Max(num1 - unscaledDeltaTime, -1f); pointCoolTimeTable[this.RegisterID] = this._coolTime; if ((double)this._coolTime > 0.0) { return; } Camera cameraComponent = Manager.Map.GetCameraComponent(); if (Object.op_Equality((Object)cameraComponent, (Object)null) || !Singleton <Resources> .IsInstance()) { return; } LocomotionProfile.DropSearchActionPointSettings actionPointSetting = Singleton <Resources> .Instance.LocomotionProfile.DropSearchActionPointSetting; Transform transform = ((Component)cameraComponent).get_transform(); float num2 = Vector3.Angle(transform.get_forward(), Vector3.op_Subtraction(((Component)this).get_transform().get_position(), transform.get_position())); float num3 = Vector3.Distance(transform.get_position(), ((Component)this).get_transform().get_position()); if ((double)actionPointSetting.AvailableAngle >= (double)num2 && (double)actionPointSetting.AvailableDistance >= (double)num3) { return; } this._isCoolTime = false; this._coolTime = 0.0f; pointCoolTimeTable.Remove(this.RegisterID); ((Component)this).get_gameObject().SetActive(true); } }
private void OnUpdate() { if (!Singleton <Manager.Map> .IsInstance() || this._playInfos.IsNullOrEmpty <EnvArea3DSE.PlayInfo>()) { return; } Manager.Map instance = Singleton <Manager.Map> .Instance; Resources res = !Singleton <Resources> .IsInstance() ? (Resources)null : Singleton <Resources> .Instance; EnvironmentSimulator simulator = instance.Simulator; foreach (EnvArea3DSE.PlayInfo playInfo in this._playInfos) { playInfo.Update(simulator.Weather, simulator.TimeZone, res, instance, ((Component)this).get_transform()); } }