示例#1
0
        public void SetGemIcon(EEventGimmick EventType)
        {
            this.MarkType = UnitGaugeMark.EMarkType.MapGem;
            EEventGimmick eeventGimmick = EventType;

            switch (eeventGimmick)
            {
            case EEventGimmick.CriUp:
                this.mGemIconType = UnitGaugeMark.EGemIcon.CriUp;
                break;

            case EEventGimmick.MovUp:
                this.mGemIconType = UnitGaugeMark.EGemIcon.MovUp;
                break;

            default:
                if (eeventGimmick == EEventGimmick.Heal)
                {
                    this.mGemIconType = UnitGaugeMark.EGemIcon.Heal;
                    break;
                }
                this.mGemIconType = UnitGaugeMark.EGemIcon.Normal;
                break;
            }
        }
示例#2
0
 public ObjectAnim(GameObject Object, Animator Animator, UnitGaugeMark.EMarkType mark_type, UnitGaugeMark.EGemIcon gem_icon)
 {
     this.Object      = Object;
     this.Animator    = Animator;
     this.MarkType    = mark_type;
     this.GemIconType = gem_icon;
     this.IsEnd       = false;
 }
示例#3
0
        public bool IsUpdatable(UnitGaugeMark.EMarkType MarkType)
        {
            bool flag = false;

            if ((UnitGauge.GaugeMode) this.GetUnitGaugeMode() == UnitGauge.GaugeMode.Normal && !this.mIsGaugeUpdate && !this.mIsUnitDead)
            {
                flag = true;
            }
            return(flag);
        }
示例#4
0
        public void ChangeAnimationByUnitType(EUnitType Type)
        {
            switch (Type)
            {
            case EUnitType.Treasure:
                this.MarkType = UnitGaugeMark.EMarkType.MapChest;
                break;

            case EUnitType.Gem:
                this.MarkType = UnitGaugeMark.EMarkType.MapGem;
                break;
            }
        }
示例#5
0
 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;
 }
示例#6
0
 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);
 }
示例#7
0
 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);
             }
         }
     }
 }
示例#8
0
 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;
 }