public void AddOneShotInfo(OneShotInfo info, bool is_priority) { if (is_priority) { infoList.Add(info); } else { infoSecondList.Add(info); } }
public static void OneShot(string effect_name, Vector3 pos, Quaternion rot, Vector3 scale, bool is_priority = false, Action <Transform> callback = null) { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) bool flag = false; if (MonoBehaviourSingleton <InGameManager> .I.graphicOptionType >= 2) { flag = true; } if (flag) { _OneShot(effect_name, pos, rot, scale, callback); } else { Vector3 val = MonoBehaviourSingleton <AppMain> .I.mainCamera.WorldToViewportPoint(pos); if (!(val.x < -0.5f) && !(val.x > 1.5f) && !(val.y < -0.5f) && !(val.y > 1.5f) && !(val.z < 0f)) { if (MonoBehaviourSingleton <EffectManager> .IsValid()) { OneShotInfo oneShotInfo = rymTPool <OneShotInfo> .Get(); oneShotInfo.name = effect_name; oneShotInfo.pos = pos; oneShotInfo.rot = rot; oneShotInfo.scale = scale; oneShotInfo.time = Time.get_time(); oneShotInfo.onCreateCallBack = callback; MonoBehaviourSingleton <EffectManager> .I.AddOneShotInfo(oneShotInfo, is_priority); } else { _OneShot(effect_name, pos, rot, scale, callback); } } } }
private void LateUpdate() { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) if (infoList.Count > 0) { OneShotInfo oneShotInfo = infoList[0]; _OneShot(oneShotInfo.name, oneShotInfo.pos, oneShotInfo.rot, oneShotInfo.scale, oneShotInfo.onCreateCallBack); rymTPool <OneShotInfo> .Release(ref oneShotInfo); infoList.RemoveAt(0); } else { int count = infoSecondList.Count; if (count > 0) { float time = Time.get_time(); int num = 0; for (int i = 0; i < count; i++) { OneShotInfo oneShotInfo2 = infoSecondList[i]; if (!(time - oneShotInfo2.time > 0.1f)) { _OneShot(oneShotInfo2.name, oneShotInfo2.pos, oneShotInfo2.rot, oneShotInfo2.scale, oneShotInfo2.onCreateCallBack); num++; break; } num++; } for (int j = 0; j < num; j++) { OneShotInfo oneShotInfo3 = infoSecondList[j]; rymTPool <OneShotInfo> .Release(ref oneShotInfo3); } infoSecondList.RemoveRange(0, num); } } }
protected override void OnDisable() { int i = 0; for (int count = infoList.Count; i < count; i++) { OneShotInfo oneShotInfo = infoList[i]; rymTPool <OneShotInfo> .Release(ref oneShotInfo); } infoList.Clear(); int j = 0; for (int count2 = infoSecondList.Count; j < count2; j++) { OneShotInfo oneShotInfo2 = infoSecondList[j]; rymTPool <OneShotInfo> .Release(ref oneShotInfo2); } infoSecondList.Clear(); base.OnDisable(); Trail.onQueryDestroy = (Func <Trail, bool>)Delegate.Remove(Trail.onQueryDestroy, new Func <Trail, bool>(OnTrailQueryDestroy)); }