Exemplo n.º 1
0
 private void StartTween()
 {
     isFinished    = false;
     isUpdateTween = true;
     grid.GetComponent <UIWidget>().SetAnchor(gridAncor);
     twCtrl.Reset();
     twCtrl.Play(true, delegate
     {
     });
 }
Exemplo n.º 2
0
 public override void UpdateUI()
 {
     if (cardDataList != null && cardDataList.Count > 0)
     {
         if (currentCardIndex >= cardDataList.Count)
         {
             currentCardIndex = 0;
         }
         if (cardDataList[currentCardIndex].gridDataList.Count > 0)
         {
             int count = cardDataList.Count;
             SetActive((Enum)UI.OBJ_BTN_ROOT, false);
             if (isFirstUpdate)
             {
                 isFirstUpdate = false;
                 SetActive((Enum)UI.OBJ_COMPLETE, false);
                 bool isCompleted = GetCurrentCard().allBingoData.isCompleted;
                 SetActive((Enum)UI.OBJ_COMPLETE_STAY, isCompleted);
                 if (isCompleted)
                 {
                     Transform   ctrl      = GetCtrl(UI.OBJ_COMPLETE_STAY);
                     UITweenCtrl component = ctrl.GetComponent <UITweenCtrl>();
                     component.Reset();
                     component.Play(true, null);
                 }
             }
             SetActive((Enum)UI.OBJ_BINGO_ANIMATION, false);
             for (int i = 0; i < count; i++)
             {
                 UpdateCard(cardDataList[i], i);
             }
         }
     }
 }
Exemplo n.º 3
0
    private void PlayAllCompleteAnimation(EventDelegate.Callback onFinished = null)
    {
        //IL_0072: Unknown result type (might be due to invalid IL or missing references)
        //IL_008f: Unknown result type (might be due to invalid IL or missing references)
        Transform ctrl = GetCtrl(UI.OBJ_COMPLETE);

        if (ctrl == null)
        {
            onFinished?.Invoke();
        }
        else
        {
            SetActive(ctrl, true);
            UITweenCtrl component = ctrl.GetComponent <UITweenCtrl>();
            if (component == null)
            {
                onFinished?.Invoke();
            }
            else
            {
                SoundManager.PlayOneshotJingle(40000392, null, null);
                ParticleSystem component2 = GetCtrl(UI.OBJ_PARTICLE_2).GetComponent <ParticleSystem>();
                component2.GetComponent <ParticleSystemRenderer>().get_sharedMaterial().set_renderQueue(4000);
                this.StartCoroutine(WaitAndDo(onFinished, CompleteAnimationTime));
                component.Reset();
                component.Play(true, null);
            }
        }
    }
    public void Play(string announce, string reward, Action onComplete)
    {
        UIWidget    component  = base.GetComponent <UIWidget>((Enum)UI.WGT_ANCHOR_POINT);
        UITweenCtrl component2 = base.GetComponent <UITweenCtrl>((Enum)UI.OBJ_TWEENCTRL);

        if (component == null || component2 == null)
        {
            if (onComplete != null)
            {
                onComplete();
            }
        }
        else
        {
            component.leftAnchor.Set(1f, 150f);
            component.rightAnchor.Set(1f, 300f);
            component.bottomAnchor.Set(1f, -130f);
            component.topAnchor.Set(1f, -105f);
            component.UpdateAnchors();
            SetLabelText((Enum)UI.LBL_ANNOUNCE, announce);
            SetLabelText((Enum)UI.LBL_REWARD, reward);
            component2.Reset();
            component2.Play(true, delegate
            {
                if (onComplete != null)
                {
                    onComplete();
                }
            });
            PlayAudio();
        }
    }
    public override void Initialize()
    {
        //IL_0064: Unknown result type (might be due to invalid IL or missing references)
        //IL_0069: Unknown result type (might be due to invalid IL or missing references)
        //IL_007b: Unknown result type (might be due to invalid IL or missing references)
        object[] array = GameSection.GetEventData() as object[];
        skillItem = (array[0] as SkillItemInfo);
        material  = (array[1] as SkillItemInfo[]);
        GameSection.SetEventData(new object[2]
        {
            ItemDetailEquip.CURRENT_SECTION.UI_PARTS,
            skillItem
        });
        UILabel component = base.GetComponent <UILabel>((Enum)UI.LBL_GOLD);

        if (component != null)
        {
            goldColor = component.color;
        }
        UITweenCtrl component2 = GetCtrl(UI.OBJ_CAPTION).get_gameObject().GetComponent <UITweenCtrl>();

        if (component2 != null)
        {
            component2.Reset();
            int i = 0;
            for (int num = component2.tweens.Length; i < num; i++)
            {
                component2.tweens[i].ResetToBeginning();
            }
            component2.Play(true, null);
        }
        isExceed        = skillItem.IsLevelMax();
        isSortTypeReset = isExceed;
        base.Initialize();
    }
    public void PlayRareFieldEnemy()
    {
        //IL_0001: Unknown result type (might be due to invalid IL or missing references)
        //IL_000d: Unknown result type (might be due to invalid IL or missing references)
        //IL_001c: Expected O, but got Unknown
        //IL_0039: Unknown result type (might be due to invalid IL or missing references)
        //IL_005b: Unknown result type (might be due to invalid IL or missing references)
        //IL_007d: Unknown result type (might be due to invalid IL or missing references)
        //IL_008e: Unknown result type (might be due to invalid IL or missing references)
        //IL_00dc: Unknown result type (might be due to invalid IL or missing references)
        this.get_gameObject().SetActive(true);
        TweenAlpha.Begin(this.get_gameObject(), 0f, 1f);
        if (rareBossTweenCtrl != null)
        {
            rareBossTweenCtrl.get_gameObject().SetActive(false);
        }
        if (fieldEnemyBossTweenCtrl != null)
        {
            fieldEnemyBossTweenCtrl.get_gameObject().SetActive(false);
        }
        if (tweenCtrl != null)
        {
            tweenCtrl.get_gameObject().SetActive(false);
        }
        fieldEnemyRareTweenCtrl.get_gameObject().SetActive(true);
        fieldEnemyRareTweenCtrl.Reset();
        fieldEnemyRareTweenCtrl.Play(true, null);
        SoundManager.PlayOneshotJingle(40000031, null, null);
        int i = 0;

        for (int num = effect.Length; i < num; i++)
        {
            this.StartCoroutine(Direction(effect[i]));
        }
    }
Exemplo n.º 7
0
 public void ShowSplendid()
 {
     //IL_0006: Unknown result type (might be due to invalid IL or missing references)
     splendid.get_gameObject().SetActive(true);
     splendid.Reset();
     SoundManager.PlayOneShotUISE(SE_ID_COMPLETE);
     splendid.Play(true, null);
 }
Exemplo n.º 8
0
    public static void Reset(Transform root, int tween_ctrl_id = 0)
    {
        UITweenCtrl uITweenCtrl = SearchTweenCtrl(root, tween_ctrl_id);

        if (!(uITweenCtrl == null))
        {
            uITweenCtrl.Reset();
        }
    }
 private void _AnnounceStart()
 {
     UITweenCtrl.Reset(tweenCtrl, 0);
     UITweenCtrl.Play(tweenCtrl, true, delegate
     {
         isLock = true;
     }, false, 0);
     lockTimer = dispTime;
     isOpen    = true;
 }
Exemplo n.º 10
0
    private void PlayTweenComplete()
    {
        CardData    currentCard = GetCurrentCard();
        UITweenCtrl completeRewardTweenlCtrl = currentCard.completeRewardTweenlCtrl;

        if (!(completeRewardTweenlCtrl == null))
        {
            SetActive(currentCard.completeRewardTweenlRoot, true);
            completeRewardTweenlCtrl.Reset();
            completeRewardTweenlCtrl.Play(true, null);
        }
    }
Exemplo n.º 11
0
 public void PlayTween(EaseDir type, bool forward = true, EventDelegate.Callback callback = null)
 {
     if (tweenAnimations != null)
     {
         UITweenCtrl uITweenCtrl = Array.Find(tweenAnimations, (UITweenCtrl t) => t.id == (int)type);
         if (uITweenCtrl != null)
         {
             uITweenCtrl.Reset();
             uITweenCtrl.Play(forward, callback);
         }
     }
 }
    private IEnumerator DoShowDialog(Desc desc)
    {
        isOpenDialog = true;
        window.SetActive(true);
        tweenCtrl.Reset();
        if (dialogInfo.Length > desc.type)
        {
            windowTransform.set_parent(dialogInfo[desc.type].link);
            windowTransform.set_localPosition(Vector3.get_zero());
            int n = 0;
            for (int m = sprites.Length; n < m; n++)
            {
                sprites[n].spriteName = dialogInfo[desc.type].spritesNames[n];
            }
            messageLabel.effectColor = dialogInfo[desc.type].lineColor;
        }
        messageLabel.supportEncoding = true;
        messageLabel.text            = desc.text;
        if (transitions != null)
        {
            int l = 0;
            for (int k = transitions.Length; l < k; l++)
            {
                transitions[l].Open(null);
            }
        }
        bool play_tween = true;

        tweenCtrl.Play(true, delegate
        {
            ((_003CDoShowDialog_003Ec__Iterator1C7) /*Error near IL_0201: stateMachine*/)._003Cplay_tween_003E__4 = false;
        });
        yield return((object)new WaitForSeconds(desc.showTime));

        while (play_tween)
        {
            yield return((object)null);
        }
        yield return((object)new WaitForSeconds(desc.showTime));

        if (transitions != null)
        {
            int j = 0;
            for (int i = transitions.Length; j < i; j++)
            {
                transitions[j].Close(null);
            }
        }
        yield return((object)this.StartCoroutine(DoWaitTransitions()));

        isOpenDialog = false;
    }
Exemplo n.º 13
0
 public void OnGetPortalPoint()
 {
     //IL_0007: Unknown result type (might be due to invalid IL or missing references)
     //IL_000d: Expected O, but got Unknown
     SetActiveSafe(addTween.get_gameObject(), true);
     addTween.Reset();
     addTween.Play(true, delegate
     {
         //IL_0007: Unknown result type (might be due to invalid IL or missing references)
         //IL_000d: Expected O, but got Unknown
         SetActiveSafe(fullTween.get_gameObject(), false);
     });
 }
Exemplo n.º 14
0
 private void Phase_StartWait()
 {
     //IL_0028: Unknown result type (might be due to invalid IL or missing references)
     //IL_002e: Expected O, but got Unknown
     //IL_0039: Unknown result type (might be due to invalid IL or missing references)
     //IL_0042: Expected O, but got Unknown
     if (0f >= waitSeconds)
     {
         phase       = Phase.FadeIn;
         waitSeconds = 1.2f;
         UITweenCtrl.Reset(tweenCtrl.get_transform(), 0);
         UITweenCtrl.Play(tweenCtrl.get_transform(), true, null, false, 0);
     }
 }
Exemplo n.º 15
0
    public void Play(ANNOUNCE_TYPE type, string userName, Action onComplete)
    {
        SetActive((Enum)UI.WGT_ANCHOR_POINT, true);
        if (widget == null || tweenCtrl == null)
        {
            if (onComplete != null)
            {
                onComplete();
            }
        }
        else
        {
            switch (type)
            {
            case ANNOUNCE_TYPE.CREATED_PARTY:
            {
                string text3 = StringTable.Get(STRING_CATEGORY.LOUNGE, 0u);
                SetLabelText((Enum)UI.LBL_ANNOUNCE, text3);
                break;
            }

            case ANNOUNCE_TYPE.JOIN_LOUNGE:
            {
                string text2 = StringTable.Get(STRING_CATEGORY.LOUNGE, 1u);
                SetLabelText((Enum)UI.LBL_ANNOUNCE, text2);
                break;
            }

            case ANNOUNCE_TYPE.LEAVED_LOUNGE:
            {
                string text = StringTable.Get(STRING_CATEGORY.LOUNGE, 2u);
                SetLabelText((Enum)UI.LBL_ANNOUNCE, text);
                break;
            }
            }
            SetLabelText((Enum)UI.LBL_USER_NAME, userName);
            SetFontStyle((Enum)UI.LBL_ANNOUNCE, 2);
            SetFontStyle((Enum)UI.LBL_USER_NAME, 2);
            tweenCtrl.Reset();
            tweenCtrl.Play(true, delegate
            {
                if (onComplete != null)
                {
                    onComplete();
                }
            });
        }
    }
 public virtual void OnClickPopMenu()
 {
     tweenCtrl.Reset();
     tweenCtrl.Skip(isPopMenu);
     isPopMenu = !isPopMenu;
     tweenCtrl.Play(isPopMenu, delegate
     {
         isLockReq = true;
         lockTimer = 0.1f;
     });
     if (!isUnLock)
     {
         panelChange.UnLock();
         isUnLock = true;
     }
     isLockReq = false;
     if (isPopMenu)
     {
         if (button != null)
         {
             button.normalSprite = buttonSpriteName[0];
         }
         else if (buttonSprite != null)
         {
             buttonSprite.spriteName = buttonSpriteName[0];
         }
         icons[0].SetActive(true);
         icons[1].SetActive(false);
         SoundManager.PlaySystemSE(SoundID.UISE.MENU_OPEN, 1f);
     }
     else
     {
         if (button != null)
         {
             button.normalSprite = buttonSpriteName[1];
         }
         else if (buttonSprite != null)
         {
             buttonSprite.spriteName = buttonSpriteName[1];
         }
         icons[0].SetActive(false);
         icons[1].SetActive(true);
         SoundManager.PlaySystemSE(SoundID.UISE.CANCEL, 1f);
     }
 }
    protected void InitializeCaption(string caption)
    {
        //IL_001e: Unknown result type (might be due to invalid IL or missing references)
        Transform ctrl = GetCtrl(UI.OBJ_CAPTION_3);

        SetLabelText(ctrl, UI.LBL_CAPTION, caption);
        UITweenCtrl component = ctrl.get_gameObject().GetComponent <UITweenCtrl>();

        if (component != null)
        {
            component.Reset();
            int i = 0;
            for (int num = component.tweens.Length; i < num; i++)
            {
                component.tweens[i].ResetToBeginning();
            }
            component.Play(true, null);
        }
    }
Exemplo n.º 18
0
    private void InitializeCaption()
    {
        //IL_0024: Unknown result type (might be due to invalid IL or missing references)
        Transform ctrl = GetCtrl(UI.OBJ_CAPTION_3);

        SetLabelText(ctrl, UI.LBL_CAPTION, StringTable.Get(STRING_CATEGORY.TEXT_SCRIPT, 26u));
        UITweenCtrl component = ctrl.get_gameObject().GetComponent <UITweenCtrl>();

        if (component != null)
        {
            component.Reset();
            int i = 0;
            for (int num = component.tweens.Length; i < num; i++)
            {
                component.tweens[i].ResetToBeginning();
            }
            component.Play(true, null);
        }
    }
 public void OpenTutorialFirstDelivery()
 {
     tweenStratCtrl.Reset();
     tweenEndCtrl.Reset();
     tweenStratCtrl.Play(true, delegate
     {
         SetState(MessageState.CollectItemImg);
         tweenEndCtrl.Play(true, delegate
         {
             //IL_0006: Unknown result type (might be due to invalid IL or missing references)
             //IL_0017: Unknown result type (might be due to invalid IL or missing references)
             tweenStratCtrl.get_gameObject().SetActive(false);
             tweenEndCtrl.get_gameObject().SetActive(false);
         });
     });
     skilBtn.onClick.Clear();
     skilBtn.onClick.Add(new EventDelegate(delegate
     {
         tweenStratCtrl.Skip(true);
     }));
 }
Exemplo n.º 20
0
    private void MoveToCenter(bool fromLeft, int cardIndex, EventDelegate.Callback OnEndEvent = null)
    {
        //IL_0015: Unknown result type (might be due to invalid IL or missing references)
        //IL_001a: Unknown result type (might be due to invalid IL or missing references)
        //IL_004a: Unknown result type (might be due to invalid IL or missing references)
        //IL_004b: Unknown result type (might be due to invalid IL or missing references)
        //IL_005d: Unknown result type (might be due to invalid IL or missing references)
        //IL_005e: Unknown result type (might be due to invalid IL or missing references)
        CardData      cardData      = cardDataList[cardIndex];
        Transform     cardTransform = cardData.cardTransform;
        Vector3       localPosition = cardTransform.get_localPosition();
        TweenPosition cardTween     = cardData.cardTween;
        UITweenCtrl   cardTweenCtrl = cardData.cardTweenCtrl;

        localPosition.x = ((!fromLeft) ? StandByX : (0f - StandByX));
        cardTween.from  = localPosition;
        localPosition.x = 0f;
        cardTween.to    = localPosition;
        cardTweenCtrl.Reset();
        cardTweenCtrl.Play(true, OnEndEvent);
    }
Exemplo n.º 21
0
 public void AttachCaption(UIBehaviour target_ui, int button_index, string caption)
 {
     //IL_002c: Unknown result type (might be due to invalid IL or missing references)
     //IL_0051: Unknown result type (might be due to invalid IL or missing references)
     if (!string.IsNullOrEmpty(caption) && button_index != 0)
     {
         UI        uI  = (UI)(0 + button_index);
         Transform val = Attach(target_ui, GetCtrl(uI));
         val.get_gameObject().set_name(UI.OBJ_CAPTION.ToString());
         SetLabelText(val, UI.LBL_CAPTION, caption);
         UITweenCtrl component = val.get_gameObject().GetComponent <UITweenCtrl>();
         if (component != null)
         {
             component.Reset();
             int i = 0;
             for (int num = component.tweens.Length; i < num; i++)
             {
                 component.tweens[i].ResetToBeginning();
             }
             component.Play(true, null);
         }
     }
 }
Exemplo n.º 22
0
 public void ResetSpActionGaugeState()
 {
     //IL_000b: Unknown result type (might be due to invalid IL or missing references)
     //IL_0021: Unknown result type (might be due to invalid IL or missing references)
     //IL_0037: Unknown result type (might be due to invalid IL or missing references)
     //IL_003d: Expected O, but got Unknown
     //IL_004d: Unknown result type (might be due to invalid IL or missing references)
     //IL_0053: Expected O, but got Unknown
     //IL_0063: Unknown result type (might be due to invalid IL or missing references)
     //IL_0069: Expected O, but got Unknown
     //IL_00a7: Unknown result type (might be due to invalid IL or missing references)
     //IL_00bd: Unknown result type (might be due to invalid IL or missing references)
     //IL_00d7: Unknown result type (might be due to invalid IL or missing references)
     //IL_00e0: Expected O, but got Unknown
     spActionGaugeADD_BOOST.sprite.get_gameObject().SetActive(false);
     spActionGaugeADD_HALF.sprite.get_gameObject().SetActive(false);
     UITweenCtrl.Reset(spActionGaugeInfo.root.get_transform(), 0);
     UITweenCtrl.Reset(spActionGaugeInfo.root.get_transform(), 1);
     UITweenCtrl.Reset(spActionGaugeInfo.root.get_transform(), 2);
     spActionGaugeInfo.state = 0;
     if (!(targetPlayer == null))
     {
         if (targetPlayer.IsSpActionGaugeHalfCharged())
         {
             spActionGaugeADD_HALF.sprite.get_gameObject().SetActive(true);
             if (spActionGaugeADD_HALF.sprite.get_gameObject().get_activeInHierarchy())
             {
                 UITweenCtrl.Play(spActionGaugeInfo.root.get_transform(), true, null, false, 1);
                 spActionGaugeInfo.SetState(SpActionGaugeInfo.ANIM_STATE.HALF);
             }
         }
         if (targetPlayer.IsSpActionGaugeFullCharged())
         {
             spActionGaugeInfo.SetState(SpActionGaugeInfo.ANIM_STATE.FULL);
         }
     }
 }
	public void Play(Action callback = null)
	{
		if (!(tweenCtrl == null))
		{
			SetVisible(true);
			tweenCtrl.Reset();
			tweenCtrl.Play(true, delegate
			{
				isLockReq = true;
				lockTimer = lockInterval;
				if (callback != null)
				{
					callback();
				}
				SetVisible(false);
			});
			if (!isUnLock)
			{
				panelChange.UnLock();
				isUnLock = true;
			}
			isLockReq = false;
		}
	}
Exemplo n.º 24
0
    protected override void UpdateParam()
    {
        //IL_0017: Unknown result type (might be due to invalid IL or missing references)
        //IL_00e3: Unknown result type (might be due to invalid IL or missing references)
        //IL_00e9: Unknown result type (might be due to invalid IL or missing references)
        //IL_00ee: Unknown result type (might be due to invalid IL or missing references)
        //IL_00f3: Unknown result type (might be due to invalid IL or missing references)
        //IL_00f8: Unknown result type (might be due to invalid IL or missing references)
        //IL_0128: Unknown result type (might be due to invalid IL or missing references)
        //IL_0129: Unknown result type (might be due to invalid IL or missing references)
        //IL_01d8: Unknown result type (might be due to invalid IL or missing references)
        //IL_01d9: Unknown result type (might be due to invalid IL or missing references)
        //IL_01de: Unknown result type (might be due to invalid IL or missing references)
        //IL_01e6: Unknown result type (might be due to invalid IL or missing references)
        //IL_01eb: Unknown result type (might be due to invalid IL or missing references)
        //IL_01ed: Unknown result type (might be due to invalid IL or missing references)
        //IL_01f2: Unknown result type (might be due to invalid IL or missing references)
        //IL_020b: Unknown result type (might be due to invalid IL or missing references)
        //IL_0223: Unknown result type (might be due to invalid IL or missing references)
        //IL_0225: Unknown result type (might be due to invalid IL or missing references)
        //IL_0226: Unknown result type (might be due to invalid IL or missing references)
        //IL_022b: Unknown result type (might be due to invalid IL or missing references)
        //IL_022d: Unknown result type (might be due to invalid IL or missing references)
        //IL_022f: Unknown result type (might be due to invalid IL or missing references)
        //IL_0243: Unknown result type (might be due to invalid IL or missing references)
        //IL_0248: Unknown result type (might be due to invalid IL or missing references)
        //IL_0264: Unknown result type (might be due to invalid IL or missing references)
        //IL_0288: Unknown result type (might be due to invalid IL or missing references)
        if (owner == null || !owner.get_gameObject().get_activeSelf())
        {
            SetSpriteEnable(false);
            isPlayAnimation = false;
        }
        else
        {
            Enemy boss = MonoBehaviourSingleton <StageObjectManager> .I.boss;
            if (boss != null)
            {
                if (!boss.IsValidShield())
                {
                    SetSpriteEnable(false);
                    isPlayAnimation = false;
                    return;
                }
                if (myPlayer != null)
                {
                    if (myPlayer.IsOnCannonMode())
                    {
                        SetSpriteEnable(false);
                        isPlayAnimation = false;
                        return;
                    }
                    SetSpriteEnable(true);
                }
                if (!isPlayAnimation)
                {
                    isPlayAnimation = true;
                    UITweenCtrl component = this.GetComponent <UITweenCtrl>();
                    component.Reset();
                    component.Play(true, null);
                }
            }
            Vector3 screenUIPosition = Utility.GetScreenUIPosition(MonoBehaviourSingleton <AppMain> .I.mainCamera, MonoBehaviourSingleton <InGameCameraManager> .I.cameraTransform, targetTransform.get_position() + offset);
            screenZ            = screenUIPosition.z;
            screenUIPosition.z = 0f;
            float   num  = 1f / MonoBehaviourSingleton <UIManager> .I.uiRoot.pixelSizeAdjustment;
            Vector3 val  = screenUIPosition;
            bool    flag = false;
            float   num2 = (float)Screen.get_width();
            if (screenUIPosition.x < screenSideOffset * num)
            {
                screenUIPosition.x = screenSideOffset * num;
                flag = true;
            }
            else if (screenUIPosition.x > num2 - screenSideOffset * num)
            {
                screenUIPosition.x = num2 - screenSideOffset * num;
                flag = true;
            }
            if (screenUIPosition.y < screenBottomOffset * num)
            {
                screenUIPosition.y = screenBottomOffset * num;
                flag = true;
            }
            if (flag)
            {
                SetSpriteEnable(true);
                Vector3 val2 = MonoBehaviourSingleton <UIManager> .I.uiCamera.ScreenToWorldPoint(screenUIPosition);

                Vector3 val3 = transform.get_position() - val2;
                if (val3.get_sqrMagnitude() >= 2E-05f)
                {
                    transform.set_position(val2);
                }
                if (arrowTransform != null)
                {
                    Vector3 val4 = val - screenUIPosition;
                    if (val4 != Vector3.get_zero())
                    {
                        float num3 = 90f - Vector3.Angle(Vector3.get_right(), val4);
                        arrowTransform.set_eulerAngles(new Vector3(0f, 0f, num3));
                    }
                    else
                    {
                        arrowTransform.set_eulerAngles(new Vector3(0f, 0f, 0f));
                    }
                }
            }
            else
            {
                SetSpriteEnable(false);
            }
        }
    }
    private void UpdateUI()
    {
        //IL_01b5: Unknown result type (might be due to invalid IL or missing references)
        //IL_01ba: Unknown result type (might be due to invalid IL or missing references)
        //IL_01d2: Unknown result type (might be due to invalid IL or missing references)
        //IL_01d7: Unknown result type (might be due to invalid IL or missing references)
        //IL_021f: Unknown result type (might be due to invalid IL or missing references)
        //IL_023a: Unknown result type (might be due to invalid IL or missing references)
        //IL_023f: Unknown result type (might be due to invalid IL or missing references)
        //IL_026b: Unknown result type (might be due to invalid IL or missing references)
        //IL_027b: Unknown result type (might be due to invalid IL or missing references)
        //IL_0280: Unknown result type (might be due to invalid IL or missing references)
        //IL_0281: Unknown result type (might be due to invalid IL or missing references)
        //IL_028d: Unknown result type (might be due to invalid IL or missing references)
        //IL_0292: Unknown result type (might be due to invalid IL or missing references)
        //IL_02ac: Unknown result type (might be due to invalid IL or missing references)
        //IL_02b1: Unknown result type (might be due to invalid IL or missing references)
        //IL_03cb: Unknown result type (might be due to invalid IL or missing references)
        //IL_03e1: Unknown result type (might be due to invalid IL or missing references)
        //IL_03f7: Unknown result type (might be due to invalid IL or missing references)
        //IL_03fd: Expected O, but got Unknown
        //IL_040d: Unknown result type (might be due to invalid IL or missing references)
        //IL_0416: Expected O, but got Unknown
        //IL_0454: Unknown result type (might be due to invalid IL or missing references)
        //IL_046a: Unknown result type (might be due to invalid IL or missing references)
        //IL_0480: Unknown result type (might be due to invalid IL or missing references)
        //IL_0486: Expected O, but got Unknown
        //IL_0496: Unknown result type (might be due to invalid IL or missing references)
        //IL_049f: Expected O, but got Unknown
        //IL_04dd: Unknown result type (might be due to invalid IL or missing references)
        //IL_04f3: Unknown result type (might be due to invalid IL or missing references)
        //IL_0509: Unknown result type (might be due to invalid IL or missing references)
        //IL_050f: Expected O, but got Unknown
        //IL_051f: Unknown result type (might be due to invalid IL or missing references)
        //IL_0528: Expected O, but got Unknown
        //IL_07ea: Unknown result type (might be due to invalid IL or missing references)
        //IL_07f0: Expected O, but got Unknown
        //IL_0800: Unknown result type (might be due to invalid IL or missing references)
        //IL_0809: Expected O, but got Unknown
        //IL_082a: Unknown result type (might be due to invalid IL or missing references)
        //IL_0830: Expected O, but got Unknown
        if (MonoBehaviourSingleton <InGameSettingsManager> .IsValid() && !string.IsNullOrEmpty(MonoBehaviourSingleton <InGameSettingsManager> .I.defenseBattleParam.enduranceObjectName))
        {
            enduranceName.text = MonoBehaviourSingleton <InGameSettingsManager> .I.defenseBattleParam.enduranceObjectName;
        }
        if (MonoBehaviourSingleton <InGameProgress> .IsValid())
        {
            enduranceHp.text = MonoBehaviourSingleton <InGameProgress> .I.defenseBattleEndurance.ToString();
        }
        if (hpGaugeUI != null)
        {
            float percent = (!(MonoBehaviourSingleton <InGameProgress> .I.defenseBattleEnduranceMax > 0f)) ? 0f : (MonoBehaviourSingleton <InGameProgress> .I.defenseBattleEndurance / MonoBehaviourSingleton <InGameProgress> .I.defenseBattleEnduranceMax);
            hpGaugeUI.SetPercent(percent, true);
        }
        if (preWeaponIndex != targetPlayer.weaponIndex)
        {
            ResetSpActionGaugeState();
            preWeaponIndex = targetPlayer.weaponIndex;
        }
        bool flag = targetPlayer.IsValidSpActionMemori();

        if (spActionGaugeInfo.gaugeMemoriObj.get_activeSelf() != flag)
        {
            spActionGaugeInfo.gaugeMemoriObj.SetActive(flag);
        }
        bool flag2 = targetPlayer.IsValidSpActionGauge();

        if (spActionGaugeInfo.root != null && spActionGaugeInfo.root.get_activeSelf() != flag2)
        {
            spActionGaugeInfo.root.SetActive(flag2);
        }
        if (flag2)
        {
            if (spActionGaugeInfo.renderer != null)
            {
                int   num = targetPlayer.CheckGaugeLevel();
                Color val = (num != -1) ? ((!targetPlayer.CheckAttackModeAndSpType(Player.ATTACK_MODE.PAIR_SWORDS, SP_ATTACK_TYPE.SOUL)) ? spActionGaugeInfo.gaugeColorJump[num] : spActionGaugeInfo.gaugeColorSoulPairSwords[num]) : ((targetPlayer.spAttackType != SP_ATTACK_TYPE.SOUL) ? ((!targetPlayer.IsSpActionGaugeHalfCharged() && !targetPlayer.isBoostMode) ? spActionGaugeInfo.gaugeColorNormal : spActionGaugeInfo.gaugeColorCharged) : ((!targetPlayer.IsSpActionGaugeHalfCharged() && !targetPlayer.isBoostMode) ? spActionGaugeInfo.gaugeColorSoul[0] : spActionGaugeInfo.gaugeColorSoul[1]));
                if (val != spActionGaugeInfo.renderer.get_material().get_color())
                {
                    spActionGaugeInfo.renderer.get_material().set_color(val);
                }
            }
            float num2  = (!(targetPlayer.CurrentWeaponSpActionGaugeMax > 0f)) ? 0f : (targetPlayer.CurrentWeaponSpActionGauge / targetPlayer.CurrentWeaponSpActionGaugeMax);
            bool  flag3 = false;
            if (spActionGaugeInfo.gaugeUI != null)
            {
                flag3 = (spActionGaugeInfo.gaugeUI.nowPercent != num2);
                if (flag3)
                {
                    spActionGaugeInfo.gaugeUI.SetPercent(num2, false);
                }
            }
            UISprite sprite = spActionGaugeADD_BOOST.sprite;
            if (flag3)
            {
                sprite.width = (int)(num2 * (float)spActionGaugeADD_BOOST.sizeMax + (1f - num2) * (float)spActionGaugeADD_BOOST.sizeMin);
            }
            if (spActionGaugeInfo.root != null && spActionGaugeInfo.root.get_activeInHierarchy())
            {
                if (targetPlayer.IsSpActionGaugeHalfCharged() && !spActionGaugeInfo.IsPlayAnim(SpActionGaugeInfo.ANIM_STATE.HALF))
                {
                    sprite.get_gameObject().SetActive(false);
                    spActionGaugeADD_HALF.sprite.get_gameObject().SetActive(true);
                    UITweenCtrl.Reset(spActionGaugeInfo.root.get_transform(), 1);
                    UITweenCtrl.Play(spActionGaugeInfo.root.get_transform(), true, null, false, 1);
                    spActionGaugeInfo.SetState(SpActionGaugeInfo.ANIM_STATE.HALF);
                    SoundManager.PlayOneShotUISE(40000358);
                }
                if (targetPlayer.IsSpActionGaugeFullCharged() && !spActionGaugeInfo.IsPlayAnim(SpActionGaugeInfo.ANIM_STATE.FULL))
                {
                    sprite.get_gameObject().SetActive(false);
                    spActionGaugeADD_HALF.sprite.get_gameObject().SetActive(true);
                    UITweenCtrl.Reset(spActionGaugeInfo.root.get_transform(), 2);
                    UITweenCtrl.Play(spActionGaugeInfo.root.get_transform(), true, null, false, 2);
                    spActionGaugeInfo.SetState(SpActionGaugeInfo.ANIM_STATE.FULL);
                    SoundManager.PlayOneShotUISE(40000359);
                }
                if (targetPlayer.isBoostMode && !spActionGaugeInfo.IsPlayAnim(SpActionGaugeInfo.ANIM_STATE.BOOST))
                {
                    sprite.get_gameObject().SetActive(true);
                    spActionGaugeADD_HALF.sprite.get_gameObject().SetActive(false);
                    UITweenCtrl.Reset(spActionGaugeInfo.root.get_transform(), 0);
                    UITweenCtrl.Play(spActionGaugeInfo.root.get_transform(), true, null, false, 0);
                    spActionGaugeInfo.SetState(SpActionGaugeInfo.ANIM_STATE.BOOST);
                }
            }
            if ((!targetPlayer.isBoostMode && spActionGaugeInfo.IsPlayAnim(SpActionGaugeInfo.ANIM_STATE.BOOST)) || (spActionGaugeInfo.IsPlayAnim(SpActionGaugeInfo.ANIM_STATE.FULL) && !targetPlayer.IsSpActionGaugeFullCharged()))
            {
                ResetSpActionGaugeState();
            }
            if (targetPlayer.isDead && spActionGaugeInfo.state != 0)
            {
                ResetSpActionGaugeState();
            }
        }
        else if (spActionGaugeInfo.state != 0)
        {
            ResetSpActionGaugeState();
        }
        bool flag4 = targetPlayer.IsOnCannonMode();
        bool flag5 = targetPlayer.targetFieldGimmickCannon is FieldGimmickCannonSpecial;
        bool flag6 = MonoBehaviourSingleton <InGameCameraManager> .IsValid() && MonoBehaviourSingleton <InGameCameraManager> .I.IsCameraModeBeam();

        cannonSpecialGaugePortrait.root.SetActive(flag4 && flag5 && MonoBehaviourSingleton <ScreenOrientationManager> .I.isPortrait && !flag6);
        cannonSpecialGaugeLandscape.root.SetActive(flag4 && flag5 && !MonoBehaviourSingleton <ScreenOrientationManager> .I.isPortrait && !flag6);
        if (flag4 && flag5)
        {
            if (MonoBehaviourSingleton <ScreenOrientationManager> .I.isPortrait)
            {
                validCannonSpecialGaugeInfo = cannonSpecialGaugePortrait;
            }
            else
            {
                validCannonSpecialGaugeInfo = cannonSpecialGaugeLandscape;
            }
        }
        if (validCannonSpecialGaugeInfo != null)
        {
            float num3 = (!(targetPlayer.GetCannonChargeMax() > 0f)) ? 0f : targetPlayer.GetCannonChargeRate();
            if (validCannonSpecialGaugeInfo.root != null && validCannonSpecialGaugeInfo.root.get_activeInHierarchy())
            {
                bool flag7 = false;
                if (validCannonSpecialGaugeInfo.gaugeUI != null && validCannonSpecialGaugeInfo.gaugeUI.nowPercent != num3)
                {
                    validCannonSpecialGaugeInfo.gaugeUI.SetPercent(num3, false);
                }
            }
            validCannonSpecialGaugeInfo.gaugeNormalObj.SetActive(!targetPlayer.IsCannonFullCharged());
            validCannonSpecialGaugeInfo.gaugeChargedObj.SetActive(targetPlayer.IsCannonFullCharged());
            validCannonSpecialGaugeInfo.gaugeAddObj.SetActive(targetPlayer.IsCannonFullCharged());
            validCannonSpecialGaugeInfo.fullTipObj.SetActive(targetPlayer.IsCannonFullCharged());
            if (targetPlayer.IsCannonFullCharged())
            {
                if (!validCannonSpecialGaugeInfo.IsPlayAnim(CannonSpecialGaugeInfo.ANIM_STATE.FULL))
                {
                    UITweenCtrl.Reset(validCannonSpecialGaugeInfo.gaugeAddObj.get_transform(), 3);
                    UITweenCtrl.Play(validCannonSpecialGaugeInfo.gaugeAddObj.get_transform(), true, null, false, 3);
                    validCannonSpecialGaugeInfo.SetState(CannonSpecialGaugeInfo.ANIM_STATE.FULL);
                }
            }
            else
            {
                UITweenCtrl.Reset(validCannonSpecialGaugeInfo.gaugeAddObj.get_transform(), 3);
                validCannonSpecialGaugeInfo.state = 0;
            }
        }
    }
 public void Play(ENEMY_TYPE type, int rareBossType = 0, bool isFieldBoss = false)
 {
     //IL_0001: Unknown result type (might be due to invalid IL or missing references)
     //IL_000d: Unknown result type (might be due to invalid IL or missing references)
     //IL_001c: Expected O, but got Unknown
     //IL_003f: Unknown result type (might be due to invalid IL or missing references)
     //IL_0061: Unknown result type (might be due to invalid IL or missing references)
     //IL_0083: Unknown result type (might be due to invalid IL or missing references)
     //IL_0094: Unknown result type (might be due to invalid IL or missing references)
     //IL_00e2: Unknown result type (might be due to invalid IL or missing references)
     //IL_0105: Unknown result type (might be due to invalid IL or missing references)
     //IL_0127: Unknown result type (might be due to invalid IL or missing references)
     //IL_0149: Unknown result type (might be due to invalid IL or missing references)
     //IL_016b: Unknown result type (might be due to invalid IL or missing references)
     //IL_01b6: Unknown result type (might be due to invalid IL or missing references)
     //IL_01d8: Unknown result type (might be due to invalid IL or missing references)
     //IL_01fa: Unknown result type (might be due to invalid IL or missing references)
     //IL_020b: Unknown result type (might be due to invalid IL or missing references)
     //IL_0259: Unknown result type (might be due to invalid IL or missing references)
     this.get_gameObject().SetActive(true);
     TweenAlpha.Begin(this.get_gameObject(), 0f, 1f);
     if (isFieldBoss)
     {
         if (rareBossTweenCtrl != null)
         {
             rareBossTweenCtrl.get_gameObject().SetActive(false);
         }
         if (tweenCtrl != null)
         {
             tweenCtrl.get_gameObject().SetActive(false);
         }
         if (fieldEnemyRareTweenCtrl != null)
         {
             fieldEnemyRareTweenCtrl.get_gameObject().SetActive(false);
         }
         fieldEnemyBossTweenCtrl.get_gameObject().SetActive(true);
         fieldEnemyBossTweenCtrl.Reset();
         fieldEnemyBossTweenCtrl.Play(true, null);
         SoundManager.PlayOneshotJingle(40000031, null, null);
         int i = 0;
         for (int num = effect.Length; i < num; i++)
         {
             this.StartCoroutine(Direction(effect[i]));
         }
     }
     else if (rareBossType > 0)
     {
         tweenCtrl.get_gameObject().SetActive(false);
         if (fieldEnemyBossTweenCtrl != null)
         {
             fieldEnemyBossTweenCtrl.get_gameObject().SetActive(false);
         }
         if (fieldEnemyRareTweenCtrl != null)
         {
             fieldEnemyRareTweenCtrl.get_gameObject().SetActive(false);
         }
         if (rareBossTweenCtrl != null)
         {
             rareBossTweenCtrl.get_gameObject().SetActive(true);
             rareBossTweenCtrl.Reset();
             rareBossTweenCtrl.Play(true, null);
         }
         SoundManager.PlayOneshotJingle(40000163, null, null);
     }
     else
     {
         if (rareBossTweenCtrl != null)
         {
             rareBossTweenCtrl.get_gameObject().SetActive(false);
         }
         if (fieldEnemyBossTweenCtrl != null)
         {
             fieldEnemyBossTweenCtrl.get_gameObject().SetActive(false);
         }
         if (fieldEnemyRareTweenCtrl != null)
         {
             fieldEnemyRareTweenCtrl.get_gameObject().SetActive(false);
         }
         tweenCtrl.get_gameObject().SetActive(true);
         tweenCtrl.Reset();
         tweenCtrl.Play(true, null);
         SoundManager.PlayOneshotJingle(40000031, null, null);
         int j = 0;
         for (int num2 = effect.Length; j < num2; j++)
         {
             this.StartCoroutine(Direction(effect[j]));
         }
     }
     SoundManager.RequestBGM(12, true);
 }
Exemplo n.º 27
0
    private IEnumerator DoGlowRegion(Vector3 from, Vector3 to)
    {
        //IL_0007: Unknown result type (might be due to invalid IL or missing references)
        //IL_0008: Unknown result type (might be due to invalid IL or missing references)
        //IL_000e: Unknown result type (might be due to invalid IL or missing references)
        //IL_000f: Unknown result type (might be due to invalid IL or missing references)
        //IL_0015: Unknown result type (might be due to invalid IL or missing references)
        //IL_0016: 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)
        yield return((object)new WaitForSeconds(0.5f));

        Vector3Interpolator ip         = new Vector3Interpolator();
        Vector3             zoomDownTo = to + new Vector3(0f, 0f, -3f);

        ip.Set(1f, from, zoomDownTo, null, default(Vector3), null);
        ip.Play();
        while (ip.IsPlaying())
        {
            ip.Update();
            worldMapCamera.targetPos = ip.Get();
            yield return((object)null);
        }
        Transform toRegion = regionAreas[toRegionID];

        toRegion.get_gameObject().SetActive(true);
        Renderer toRegionRenderer = toRegion.GetComponent <Renderer>();

        toRegionRenderer.get_material().SetFloat("_Alpha", 0f);
        Renderer topRenderer = glowRegionTop.GetComponent <Renderer>();

        topRenderer.get_material().SetFloat("_Alpha", 0f);
        topRenderer.get_material().SetFloat("_AddColor", 1f);
        topRenderer.get_material().SetFloat("_BlendRate", 1f);
        topRenderer.set_sortingOrder(2);
        glowRegionTop.get_gameObject().SetActive(true);
        DelayExecute(1f, delegate
        {
            //IL_000b: Unknown result type (might be due to invalid IL or missing references)
            ((_003CDoGlowRegion_003Ec__Iterator16E) /*Error near IL_0211: stateMachine*/)._003C_003Ef__this.mapGlowEffectA.get_gameObject().SetActive(true);
            Renderer component = ((_003CDoGlowRegion_003Ec__Iterator16E) /*Error near IL_0211: stateMachine*/)._003C_003Ef__this.mapGlowEffectA.GetComponent <Renderer>();
            component.set_sortingOrder(1);
        });
        yield return((object)new WaitForSeconds(1f));

        ip.Set(1f, zoomDownTo, to, null, default(Vector3), null);
        ip.Play();
        while (ip.IsPlaying())
        {
            ip.Update();
            worldMapCamera.targetPos = ip.Get();
            yield return((object)null);
        }
        FloatInterpolator fip = new FloatInterpolator();

        fip.Set(2f, 0f, 1.5f, null, 0f, null);
        fip.Play();
        SoundManager.PlayOneShotUISE(SE_ID_SMOKE);
        while (fip.IsPlaying())
        {
            fip.Update();
            topRenderer.get_material().SetFloat("_Alpha", fip.Get());
            yield return((object)null);
        }
        toRegionRenderer.get_material().SetFloat("_Alpha", 1f);
        mapGlowEffectParticleA.Stop();
        mapGlowEffectB.get_gameObject().SetActive(true);
        yield return((object)new WaitForSeconds(0f));

        fip.Set(0.2f, 1f, 0f, null, 0f, null);
        fip.Play();
        while (fip.IsPlaying())
        {
            fip.Update();
            topRenderer.get_material().SetFloat("_Alpha", fip.Get());
            yield return((object)null);
        }
        yield return((object)new WaitForSeconds(0f));

        targetRegionIcon.get_gameObject().SetActive(true);
        TweenScale tweenScale = targetRegionIcon.GetComponent <TweenScale>();

        tweenScale.PlayForward();
        yield return((object)new WaitForSeconds(1f));

        mapGlowEffectParticleB.Stop();
        bool        isTweenEnd = false;
        UITweenCtrl tweenCtrl  = telop.GetComponent <UITweenCtrl>();

        tweenCtrl.Reset();
        tweenCtrl.Play(true, delegate
        {
            ((_003CDoGlowRegion_003Ec__Iterator16E) /*Error near IL_04df: stateMachine*/)._003CisTweenEnd_003E__7 = true;
        });
        SoundManager.PlayOneShotUISE(SE_ID_LOGO);
        while (!isTweenEnd)
        {
            yield return((object)null);
        }
        yield return((object)new WaitForSeconds(0f));

        Vector3 scaleBegin = playerMarker.get_localScale();
        Vector3 scaleEnd   = new Vector3(0f, 0f, 0f);

        ip.Set(0.5f, scaleBegin, scaleEnd, null, default(Vector3), null);
        ip.Play();
        while (ip.IsPlaying())
        {
            ip.Update();
            playerMarker.set_localScale(ip.Get());
            yield return((object)null);
        }
        RegionTable.Data targetData = openedRegionInfo[toRegionID].data;
        if (targetData != null)
        {
            playerMarker.set_localPosition(targetData.markerPos);
        }
        yield return((object)new WaitForSeconds(0.1f));

        ip.Set(0.5f, scaleEnd, scaleBegin, null, default(Vector3), null);
        ip.Play();
        while (ip.IsPlaying())
        {
            ip.Update();
            playerMarker.set_localScale(ip.Get());
            yield return((object)null);
        }
        yield return((object)new WaitForSeconds(0.4f));

        OnQuery_EXIT();
    }
Exemplo n.º 28
0
    private void UpdateUI()
    {
        //IL_00db: Unknown result type (might be due to invalid IL or missing references)
        //IL_0244: Unknown result type (might be due to invalid IL or missing references)
        //IL_0264: Unknown result type (might be due to invalid IL or missing references)
        //IL_03cd: Unknown result type (might be due to invalid IL or missing references)
        //IL_03d2: Unknown result type (might be due to invalid IL or missing references)
        //IL_03eb: Unknown result type (might be due to invalid IL or missing references)
        //IL_03f0: Unknown result type (might be due to invalid IL or missing references)
        //IL_0439: Unknown result type (might be due to invalid IL or missing references)
        //IL_0454: Unknown result type (might be due to invalid IL or missing references)
        //IL_0459: Unknown result type (might be due to invalid IL or missing references)
        //IL_0486: Unknown result type (might be due to invalid IL or missing references)
        //IL_0496: Unknown result type (might be due to invalid IL or missing references)
        //IL_049b: Unknown result type (might be due to invalid IL or missing references)
        //IL_049d: Unknown result type (might be due to invalid IL or missing references)
        //IL_04aa: Unknown result type (might be due to invalid IL or missing references)
        //IL_04af: Unknown result type (might be due to invalid IL or missing references)
        //IL_04c9: Unknown result type (might be due to invalid IL or missing references)
        //IL_04ce: Unknown result type (might be due to invalid IL or missing references)
        //IL_05e9: Unknown result type (might be due to invalid IL or missing references)
        //IL_05ff: Unknown result type (might be due to invalid IL or missing references)
        //IL_0615: Unknown result type (might be due to invalid IL or missing references)
        //IL_061b: Expected O, but got Unknown
        //IL_062b: Unknown result type (might be due to invalid IL or missing references)
        //IL_0634: Expected O, but got Unknown
        //IL_0672: Unknown result type (might be due to invalid IL or missing references)
        //IL_0688: Unknown result type (might be due to invalid IL or missing references)
        //IL_069e: Unknown result type (might be due to invalid IL or missing references)
        //IL_06a4: Expected O, but got Unknown
        //IL_06b4: Unknown result type (might be due to invalid IL or missing references)
        //IL_06bd: Expected O, but got Unknown
        //IL_06fb: Unknown result type (might be due to invalid IL or missing references)
        //IL_0711: Unknown result type (might be due to invalid IL or missing references)
        //IL_0727: Unknown result type (might be due to invalid IL or missing references)
        //IL_072d: Expected O, but got Unknown
        //IL_073d: Unknown result type (might be due to invalid IL or missing references)
        //IL_0746: Expected O, but got Unknown
        if (playerName != null && !string.IsNullOrEmpty(targetPlayer.charaName))
        {
            playerName.text = targetPlayer.charaName;
        }
        if (playerHp != null && lastHP != targetPlayer.hpShow)
        {
            lastHP        = targetPlayer.hpShow;
            playerHp.text = targetPlayer.hpShow.ToString();
        }
        if (playerShieldHp != null && lastShieldHP != (int)targetPlayer.ShieldHp)
        {
            lastShieldHP = targetPlayer.ShieldHp;
            playerShieldHp.get_gameObject().SetActive(targetPlayer.IsValidShield());
            playerShieldHp.text = targetPlayer.ShieldHp.ToString();
        }
        if (hpGaugeUI != null)
        {
            float num = (targetPlayer.hpMax <= 0) ? 0f : ((float)targetPlayer.hpShow / (float)targetPlayer.hpMax);
            if (hpGaugeUI.nowPercent != num)
            {
                hpGaugeUI.SetPercent(num, true);
            }
        }
        if (healHpGaugeUI != null)
        {
            float num2 = (targetPlayer.hpMax <= 0) ? 0f : ((float)targetPlayer.healHp / (float)targetPlayer.hpMax);
            if (healHpGaugeUI.nowPercent != num2)
            {
                healHpGaugeUI.SetPercent(num2, false);
            }
        }
        if (shieldHpGaugeUI != null && shieldHpGaugeADD.sprite != null)
        {
            float num3 = ((int)targetPlayer.ShieldHpMax <= 0) ? 0f : ((float)(int)targetPlayer.ShieldHp / (float)(int)targetPlayer.ShieldHpMax);
            shieldHpGaugeUI.get_gameObject().SetActive(targetPlayer.IsValidShield());
            shieldHpGaugeADD.sprite.get_gameObject().SetActive(targetPlayer.IsValidShield());
            if (shieldHpGaugeUI.nowPercent != num3)
            {
                shieldHpGaugeUI.SetPercent(num3, false);
                shieldHpGaugeADD.sprite.width = (int)(num3 * (float)shieldHpGaugeADD.sizeMax + (1f - num3) * (float)shieldHpGaugeADD.sizeMin);
            }
        }
        if (preWeaponIndex != targetPlayer.weaponIndex)
        {
            ResetSpActionGaugeState();
            preWeaponIndex = targetPlayer.weaponIndex;
        }
        bool flag = targetPlayer.IsValidSpActionMemori();

        if (spActionGaugeInfo.gaugeMemoriObj.get_activeSelf() != flag)
        {
            spActionGaugeInfo.gaugeMemoriObj.SetActive(flag);
        }
        bool flag2 = targetPlayer.IsValidSpActionGauge();

        if (spActionGaugeInfo.root != null && spActionGaugeInfo.root.get_activeSelf() != flag2)
        {
            spActionGaugeInfo.root.SetActive(flag2);
        }
        if (flag2)
        {
            if (spActionGaugeInfo.renderer != null)
            {
                int   num4 = targetPlayer.CheckGaugeLevel();
                Color val  = (num4 != -1) ? ((!targetPlayer.CheckAttackModeAndSpType(Player.ATTACK_MODE.PAIR_SWORDS, SP_ATTACK_TYPE.SOUL)) ? spActionGaugeInfo.gaugeColorJump[num4] : spActionGaugeInfo.gaugeColorSoulPairSwords[num4]) : ((targetPlayer.spAttackType != SP_ATTACK_TYPE.SOUL) ? ((!targetPlayer.IsSpActionGaugeHalfCharged() && !targetPlayer.isBoostMode) ? spActionGaugeInfo.gaugeColorNormal : spActionGaugeInfo.gaugeColorCharged) : ((!targetPlayer.IsSpActionGaugeHalfCharged() && !targetPlayer.isBoostMode) ? spActionGaugeInfo.gaugeColorSoul[0] : spActionGaugeInfo.gaugeColorSoul[1]));
                if (val != spActionGaugeInfo.renderer.get_material().get_color())
                {
                    spActionGaugeInfo.renderer.get_material().set_color(val);
                }
            }
            float num5  = (!(targetPlayer.CurrentWeaponSpActionGaugeMax > 0f)) ? 0f : (targetPlayer.CurrentWeaponSpActionGauge / targetPlayer.CurrentWeaponSpActionGaugeMax);
            bool  flag3 = false;
            if (spActionGaugeInfo.gaugeUI != null)
            {
                flag3 = (spActionGaugeInfo.gaugeUI.nowPercent != num5);
                if (flag3)
                {
                    spActionGaugeInfo.gaugeUI.SetPercent(num5, false);
                }
            }
            UISprite sprite = spActionGaugeADD_BOOST.sprite;
            if (flag3)
            {
                sprite.width = (int)(num5 * (float)spActionGaugeADD_BOOST.sizeMax + (1f - num5) * (float)spActionGaugeADD_BOOST.sizeMin);
            }
            if (spActionGaugeInfo.root != null && spActionGaugeInfo.root.get_activeInHierarchy())
            {
                if (targetPlayer.IsSpActionGaugeHalfCharged() && !spActionGaugeInfo.IsPlayAnim(SpActionGaugeInfo.ANIM_STATE.HALF))
                {
                    sprite.get_gameObject().SetActive(false);
                    spActionGaugeADD_HALF.sprite.get_gameObject().SetActive(true);
                    UITweenCtrl.Reset(spActionGaugeInfo.root.get_transform(), 1);
                    UITweenCtrl.Play(spActionGaugeInfo.root.get_transform(), true, null, false, 1);
                    spActionGaugeInfo.SetState(SpActionGaugeInfo.ANIM_STATE.HALF);
                    SoundManager.PlayOneShotUISE(40000358);
                }
                if (targetPlayer.IsSpActionGaugeFullCharged() && !spActionGaugeInfo.IsPlayAnim(SpActionGaugeInfo.ANIM_STATE.FULL))
                {
                    sprite.get_gameObject().SetActive(false);
                    spActionGaugeADD_HALF.sprite.get_gameObject().SetActive(true);
                    UITweenCtrl.Reset(spActionGaugeInfo.root.get_transform(), 2);
                    UITweenCtrl.Play(spActionGaugeInfo.root.get_transform(), true, null, false, 2);
                    spActionGaugeInfo.SetState(SpActionGaugeInfo.ANIM_STATE.FULL);
                    SoundManager.PlayOneShotUISE(40000359);
                }
                if (targetPlayer.isBoostMode && !spActionGaugeInfo.IsPlayAnim(SpActionGaugeInfo.ANIM_STATE.BOOST))
                {
                    sprite.get_gameObject().SetActive(true);
                    spActionGaugeADD_HALF.sprite.get_gameObject().SetActive(false);
                    UITweenCtrl.Reset(spActionGaugeInfo.root.get_transform(), 0);
                    UITweenCtrl.Play(spActionGaugeInfo.root.get_transform(), true, null, false, 0);
                    spActionGaugeInfo.SetState(SpActionGaugeInfo.ANIM_STATE.BOOST);
                }
            }
            if ((!targetPlayer.isBoostMode && spActionGaugeInfo.IsPlayAnim(SpActionGaugeInfo.ANIM_STATE.BOOST)) || (spActionGaugeInfo.IsPlayAnim(SpActionGaugeInfo.ANIM_STATE.FULL) && !targetPlayer.IsSpActionGaugeFullCharged()))
            {
                ResetSpActionGaugeState();
            }
            if (targetPlayer.isDead && spActionGaugeInfo.state != 0)
            {
                ResetSpActionGaugeState();
            }
        }
        else if (spActionGaugeInfo.state != 0)
        {
            ResetSpActionGaugeState();
        }
    }
Exemplo n.º 29
0
 private void Start()
 {
     tweenCtrl.Reset();
     tweenCtrl.Play(true, null);
 }