private void SetEndAnimation(UnitGaugeMark.ObjectAnim mark) { if (mark == null || UnityEngine.Object.op_Equality((UnityEngine.Object)mark.Animator, (UnityEngine.Object)null) || mark.IsEnd) { return; } mark.IsEnd = true; mark.Animator.SetInteger(this.EndTriggerName, this.EndTriggerValue); }
private void Update() { if (this.mActiveMarks == null) { return; } for (int index = 0; index < this.mActiveMarks.Length; ++index) { UnitGaugeMark.ObjectAnim mActiveMark = this.mActiveMarks[index]; if (mActiveMark != null) { if (!this.IsUpdatable((UnitGaugeMark.EMarkType)index)) { mActiveMark.Object.SetActive(false); } else { if (!mActiveMark.Object.get_activeInHierarchy()) { this.mActiveMarks[index] = (UnitGaugeMark.ObjectAnim)null; mActiveMark.Release(); break; } if (mActiveMark.Object.get_activeInHierarchy() && Object.op_Inequality((Object)mActiveMark.Animator, (Object)null)) { AnimatorStateInfo animatorStateInfo = mActiveMark.Animator.GetCurrentAnimatorStateInfo(0); // ISSUE: explicit reference operation // ISSUE: explicit reference operation if (((AnimatorStateInfo)@animatorStateInfo).IsName(this.EndAnimationName) && !mActiveMark.Animator.IsInTransition(0) && (double)((AnimatorStateInfo)@animatorStateInfo).get_normalizedTime() >= 1.0) { this.mActiveMarks[index] = (UnitGaugeMark.ObjectAnim)null; mActiveMark.Release(); } } } } } if (this.IsUpdatable(this.MarkType) && this.MarkType != UnitGaugeMark.EMarkType.None && this.mActiveMarks[(int)this.MarkType] == null) { GameObject markObject = this.CreateMarkObject(); if (Object.op_Inequality((Object)markObject, (Object)null)) { markObject.get_transform().SetParent(((Component)this).get_transform()); markObject.get_transform().SetAsFirstSibling(); Animator component = (Animator)markObject.GetComponent <Animator>(); component.SetInteger(this.EndTriggerName, 0); this.mActiveMarks[(int)this.MarkType] = new UnitGaugeMark.ObjectAnim(markObject, component); } } this.MarkType = UnitGaugeMark.EMarkType.None; }
public void SetEndAnimation(UnitGaugeMark.EMarkType Type) { if (this.mActiveMarks == null) { return; } UnitGaugeMark.ObjectAnim mActiveMark = this.mActiveMarks[(int)Type]; if (mActiveMark == null || Object.op_Equality((Object)mActiveMark.Animator, (Object)null) || mActiveMark.IsEnd) { return; } mActiveMark.IsEnd = true; mActiveMark.Animator.SetInteger(this.EndTriggerName, this.EndTriggerValue); }
public void SetEndAnimation(UnitGaugeMark.EMarkType Type) { using (List <UnitGaugeMark.ObjectAnim> .Enumerator enumerator = this.mActiveMarkLists.GetEnumerator()) { while (enumerator.MoveNext()) { UnitGaugeMark.ObjectAnim current = enumerator.Current; if (current.MarkType == Type) { this.SetEndAnimation(current); } } } }
public void DeleteIconAll() { if (this.mActiveMarks == null) { return; } for (int index = 0; index < this.mActiveMarks.Length; ++index) { UnitGaugeMark.ObjectAnim mActiveMark = this.mActiveMarks[index]; if (mActiveMark != null) { mActiveMark.Release(); this.mActiveMarks[index] = (UnitGaugeMark.ObjectAnim)null; } } }
private void Update() { for (int index = 0; index < this.mActiveMarkLists.Count; ++index) { UnitGaugeMark.ObjectAnim mActiveMarkList = this.mActiveMarkLists[index]; if (!this.IsUpdatable(mActiveMarkList.MarkType)) { mActiveMarkList.Object.SetActive(false); } else if (!mActiveMarkList.Object.get_activeInHierarchy()) { mActiveMarkList.Release(); this.mActiveMarkLists.RemoveAt(index--); } else if (mActiveMarkList.Object.get_activeInHierarchy() && UnityEngine.Object.op_Inequality((UnityEngine.Object)mActiveMarkList.Animator, (UnityEngine.Object)null)) { AnimatorStateInfo animatorStateInfo = mActiveMarkList.Animator.GetCurrentAnimatorStateInfo(0); // ISSUE: explicit reference operation // ISSUE: explicit reference operation if (((AnimatorStateInfo)@animatorStateInfo).IsName(this.EndAnimationName) && !mActiveMarkList.Animator.IsInTransition(0) && (double)((AnimatorStateInfo)@animatorStateInfo).get_normalizedTime() >= 1.0) { mActiveMarkList.Release(); this.mActiveMarkLists.RemoveAt(index--); } } } if (this.MarkType != UnitGaugeMark.EMarkType.None && this.IsUpdatable(this.MarkType) && this.mActiveMarkLists.Find((Predicate <UnitGaugeMark.ObjectAnim>)(am => { if (am.MarkType == this.MarkType) { return(am.GemIconType == this.mGemIconType); } return(false); })) == null) { GameObject markObject = this.CreateMarkObject(); if (UnityEngine.Object.op_Inequality((UnityEngine.Object)markObject, (UnityEngine.Object)null)) { markObject.get_transform().SetParent(((Component)this).get_transform()); markObject.get_transform().SetAsLastSibling(); Animator component = (Animator)markObject.GetComponent <Animator>(); component.SetInteger(this.EndTriggerName, 0); this.mActiveMarkLists.Add(new UnitGaugeMark.ObjectAnim(markObject, component, this.MarkType, this.mGemIconType)); } } this.MarkType = UnitGaugeMark.EMarkType.None; }
public void DeleteIconAll() { int num; for (int index1 = 0; index1 < this.mActiveMarkLists.Count; index1 = num + 1) { UnitGaugeMark.ObjectAnim mActiveMarkList = this.mActiveMarkLists[index1]; if (mActiveMarkList != null) { mActiveMarkList.Release(); } List <UnitGaugeMark.ObjectAnim> mActiveMarkLists = this.mActiveMarkLists; int index2 = index1; num = index2 - 1; mActiveMarkLists.RemoveAt(index2); } }