Exemple #1
0
    /// <summary>
    /// ロック対象変更
    /// </summary>
    public void OnLockObjectChange()
    {
        lockChangeEffect.Reset();
        lockChangeEffect.Play(false);

        Pilot lockObj = player.lockObject;

        if (lockObj)
        {
            //追尾の対象に設定
            lockObjectCamera.mainTarget      = lockObj.gameObject;
            lockObjectLabel.text             = lockObj.name + "[" + lockObj.ship.shipName + "]";
            lockObjectCamera.minSize         = lockObj.ship.collisionRadius * lockObjectCameraScale;
            lockObjectCameraViewport.enabled = false;
            //方向表示
            lockObjectDirection.gameObject.SetActive(true);
            Color c = lockObj.ship.symbolColor;            //FuncBox.SetColorAlpha(, lockObjectDirection.color.a);
            lockObjectDirection.color = c;
            //マーカー
            if (flagLongRange)
            {
                lockObjectMarker.enabled = true;
            }
            lockObjectMarker.color = c;
            //ポップアップ
            popupLabel.PlayPopup("ロック : " + lockObj.name, false);
        }
        else
        {
            OnUnLock();
        }
    }
Exemple #2
0
 /// <summary>
 /// 通常弾発射
 /// </summary>
 public void OnAButton()
 {
     normalShotEffect.Reset();
     normalShotEffect.Play(false);
     //テスト
     PlayPopupItem("Icon_Missile", 10);
 }
Exemple #3
0
    public void Play(bool forward)
    {
        GameObject gameObject = (!(tweenTarget == null)) ? tweenTarget : base.gameObject;

        if (!NGUITools.GetActive(gameObject))
        {
            if (ifDisabledOnPlay != EnableCondition.EnableThenPlay)
            {
                return;
            }
            NGUITools.SetActive(gameObject, state: true);
        }
        mTweens = ((!includeChildren) ? gameObject.GetComponents <UITweener>() : gameObject.GetComponentsInChildren <UITweener>());
        if (mTweens.Length == 0)
        {
            if (disableWhenFinished != 0)
            {
                NGUITools.SetActive(tweenTarget, state: false);
            }
            return;
        }
        bool flag = false;

        if (playDirection == Direction.Reverse)
        {
            forward = !forward;
        }
        int i = 0;

        for (int num = mTweens.Length; i < num; i++)
        {
            UITweener uITweener = mTweens[i];
            if (uITweener.tweenGroup == tweenGroup)
            {
                if (!flag && !NGUITools.GetActive(gameObject))
                {
                    flag = true;
                    NGUITools.SetActive(gameObject, state: true);
                }
                if (playDirection == Direction.Toggle)
                {
                    uITweener.Toggle();
                }
                else
                {
                    uITweener.Play(forward);
                }
                if (resetOnPlay)
                {
                    uITweener.Reset();
                }
                uITweener.onFinished = onFinished;
                if (eventReceiver != null && !string.IsNullOrEmpty(callWhenFinished))
                {
                    uITweener.eventReceiver    = eventReceiver;
                    uITweener.callWhenFinished = callWhenFinished;
                }
            }
        }
    }
Exemple #4
0
    public void Play(bool forward)
    {
        GameObject gameObject = (this.tweenTarget != null ? this.tweenTarget : base.gameObject);

        if (!gameObject.activeInHierarchy)
        {
            if (this.ifDisabledOnPlay != EnableCondition.EnableThenPlay)
            {
                return;
            }
            NGUITools.SetActive(gameObject, true);
        }
        this.mTweens = (!this.includeChildren ? gameObject.GetComponents <UITweener>() : gameObject.GetComponentsInChildren <UITweener>());
        if ((int)this.mTweens.Length != 0)
        {
            bool flag = false;
            if (this.playDirection == Direction.Reverse)
            {
                forward = !forward;
            }
            int num    = 0;
            int length = (int)this.mTweens.Length;
            while (num < length)
            {
                UITweener uITweener = this.mTweens[num];
                if (uITweener.tweenGroup == this.tweenGroup)
                {
                    if (!flag && !gameObject.activeInHierarchy)
                    {
                        flag = true;
                        NGUITools.SetActive(gameObject, true);
                    }
                    if (this.playDirection != Direction.Toggle)
                    {
                        uITweener.Play(forward);
                    }
                    else
                    {
                        uITweener.Toggle();
                    }
                    if (this.resetOnPlay)
                    {
                        uITweener.Reset();
                    }
                    if (this.eventReceiver != null && !string.IsNullOrEmpty(this.callWhenFinished))
                    {
                        uITweener.eventReceiver    = this.eventReceiver;
                        uITweener.callWhenFinished = this.callWhenFinished;
                    }
                }
                num++;
            }
        }
        else if (this.disableWhenFinished != DisableCondition.DoNotDisable)
        {
            NGUITools.SetActive(this.tweenTarget, false);
        }
    }
 // Token: 0x06001742 RID: 5954 RVA: 0x0000FADC File Offset: 0x0000DCDC
 private void FlashMenuIcon(UITweener buttonTween, bool bFlash)
 {
     if (buttonTween == null)
     {
         return;
     }
     if (!bFlash)
     {
         buttonTween.Reset();
         buttonTween.gameObject.GetComponent <UISprite>().alpha = 1f;
     }
     buttonTween.enabled = bFlash;
 }
 void OnXClick(bool active)
 {
     if (!active)
     {
         m_SwitchXY.isChecked  = false;
         m_SwitchZX.isChecked  = false;
         m_SwitchXYZ.isChecked = false;
     }
     ApplyVectorToInput();
     m_GlowIcon.Reset();
     m_GlowIcon.Play(true);
 }
Exemple #7
0
 /// <summary>
 /// アイテムポップアップ再生
 /// </summary>
 public void PlayPopupItem(string spriteName, int num)
 {
     popupItem.Reset();
     popupItem.Play(true);
     popupItemSprite.SetAtlasSprite(popupItemSprite.atlas.GetSprite(spriteName));
     if (num > 0)
     {
         popupItemLabel.text = "✖" + num;
     }
     else
     {
         popupItemLabel.text = "";
     }
 }
Exemple #8
0
 void ResetTween()
 {
     UITweener[] m_Tweens = m_ResetTweenParent.GetComponentsInChildren <UITweener>();
     if (m_Tweens.Length != 0)
     {
         for (int i = 0; i < m_Tweens.Length; i++)
         {
             UITweener tw = m_Tweens[i];
             if (tw.tweenGroup == 10)
             {
                 tw.Reset();
             }
         }
     }
 }
 /// <summary>
 /// ロック対象変更
 /// </summary>
 public void OnLockObjectChange()
 {
     //エフェクト
     lockButtonEffectTween.Reset();
     lockButtonEffectTween.Play(true);
     //角度表示
     if (player.lockObject)
     {
         lockObjectDirection.gameObject.SetActive(true);
         lockObjectDirection.color = player.lockObject.ship.symbolColor;
     }
     else
     {
         lockObjectDirection.gameObject.SetActive(false);
     }
 }
Exemple #10
0
    /// <summary>
    /// Activate the tweeners.
    /// </summary>

    public void Play(bool forward)
    {
        GameObject go = (tweenTarget == null) ? gameObject : tweenTarget;

        if (!NGUITools.GetActive(go))
        {
            // If the object is disabled, don't do anything
            if (ifDisabledOnPlay != EnableCondition.EnableThenPlay)
            {
                return;
            }

            // Enable the game object before tweening it
            NGUITools.SetActive(go, true);
        }

        // Gather the tweening components
        mTweens = includeChildren ? go.GetComponentsInChildren <UITweener>() : go.GetComponents <UITweener>();

        if (mTweens.Length == 0)
        {
            // No tweeners found -- should we disable the object?
            if (disableWhenFinished != DisableCondition.DoNotDisable)
            {
                NGUITools.SetActive(tweenTarget, false);
            }
        }
        else
        {
            bool activated = false;
            if (playDirection == Direction.Reverse)
            {
                forward = !forward;
            }

            // Run through all located tween components
            for (int i = 0, imax = mTweens.Length; i < imax; ++i)
            {
                UITweener tw = mTweens[i];

                // If the tweener's group matches, we can work with it
                if (tw.tweenGroup == tweenGroup)
                {
                    // Ensure that the game objects are enabled
                    if (!activated && !NGUITools.GetActive(go))
                    {
                        activated = true;
                        NGUITools.SetActive(go, true);
                    }

                    // Toggle or activate the tween component
                    if (playDirection == Direction.Toggle)
                    {
                        tw.Toggle();
                    }
                    else
                    {
                        tw.Play(forward);
                    }
                    if (resetOnPlay)
                    {
                        tw.Reset();
                    }

                    // Set the delegate
                    tw.onFinished = onFinished;

                    // Copy the event receiver
                    if (eventReceiver != null && !string.IsNullOrEmpty(callWhenFinished))
                    {
                        tw.eventReceiver    = eventReceiver;
                        tw.callWhenFinished = callWhenFinished;
                    }
                }
            }
        }
    }
Exemple #11
0
 // Update is called once per frame
 void Update()
 {
     if (!VCEditor.DocumentOpen())
     {
         return;
     }
     if (VCEditor.Instance.m_UI.m_MaterialTab.isChecked)
     {
         if (VCEditor.SelectedMaterial != null)
         {
             if (m_lastMat != VCEditor.SelectedMaterial)
             {
                 m_UIGroup.SetActive(true);
                 m_MaterialIconTexture.mainTexture = VCEditor.SelectedMaterial.m_DiffuseTex;
                 m_MaterialIcon.material           = m_MaterialIconTexture;
                 m_IconMask.GetComponent <UITweener>().Reset();
                 m_IconMask.GetComponent <UITweener>().Play(true);
                 m_GlowIcon.Reset();
                 m_GlowIcon.Play(true);
                 m_MaterialIcon.gameObject.SetActive(true);
                 m_ComponentIcon.gameObject.SetActive(false);
                 m_ColorIcon.gameObject.SetActive(false);
                 m_ItemNameLabel.text = VCEditor.SelectedMaterial.m_Name;
                 m_IconMask.SetActive(true);
             }
         }
         else
         {
             m_UIGroup.SetActive(false);
         }
         m_lastMat   = VCEditor.SelectedMaterial;
         m_lastDecal = null;
         m_lastPart  = null;
         m_lastColor = Color.clear;
     }
     else if (VCEditor.Instance.m_UI.m_DecalTab.isChecked)
     {
         if (VCEditor.SelectedDecal != null)
         {
             if (m_lastDecal != VCEditor.SelectedDecal)
             {
                 m_UIGroup.SetActive(true);
                 m_MaterialIconTexture.mainTexture = VCEditor.SelectedDecal.m_Tex;
                 m_MaterialIcon.material           = m_MaterialIconTexture;
                 m_IconMask.GetComponent <UITweener>().Reset();
                 m_IconMask.GetComponent <UITweener>().Play(true);
                 m_GlowIcon.Reset();
                 m_GlowIcon.Play(true);
                 m_MaterialIcon.gameObject.SetActive(true);
                 m_ComponentIcon.gameObject.SetActive(false);
                 m_ColorIcon.gameObject.SetActive(false);
                 m_ItemNameLabel.text = "1 " + "decal".ToLocalizationString() + "  [999999](UID = " + VCEditor.SelectedDecal.GUIDString + ")[-]";
                 m_IconMask.SetActive(true);
             }
         }
         else
         {
             m_UIGroup.SetActive(false);
         }
         m_lastDecal = VCEditor.SelectedDecal;
         m_lastMat   = null;
         m_lastPart  = null;
         m_lastColor = Color.clear;
     }
     else if (VCEditor.Instance.m_UI.m_PartTab.isChecked)
     {
         if (VCEditor.SelectedPart != null)
         {
             if (m_lastPart != VCEditor.SelectedPart)
             {
                 m_ComponentIcon.spriteName = VCEditor.SelectedPart.m_IconPath.Split(',')[0];
                 m_IconMask.GetComponent <UITweener>().Reset();
                 m_IconMask.GetComponent <UITweener>().Play(true);
                 m_GlowIcon.Reset();
                 m_GlowIcon.Play(true);
                 m_ComponentIcon.gameObject.SetActive(true);
                 m_UIGroup.SetActive(true);
                 m_MaterialIcon.gameObject.SetActive(false);
                 m_ColorIcon.gameObject.SetActive(false);
                 m_ItemNameLabel.text = VCEditor.SelectedPart.m_Name;
                 m_IconMask.SetActive(true);
             }
         }
         else
         {
             m_UIGroup.SetActive(false);
         }
         m_lastMat   = null;
         m_lastDecal = null;
         m_lastPart  = VCEditor.SelectedPart;
         m_lastColor = Color.clear;
     }
     else if (VCEditor.Instance.m_UI.m_PaintTab.isChecked)
     {
         Color color = VCEditor.SelectedColor;
         color.a           = 1;
         m_ColorIcon.color = color;
         if (m_lastColor != color)
         {
             m_IconMask.GetComponent <UITweener>().Reset();
             m_IconMask.GetComponent <UITweener>().Play(true);
             m_GlowIcon.Reset();
             m_GlowIcon.Play(true);
         }
         m_ColorIcon.gameObject.SetActive(true);
         m_UIGroup.SetActive(true);
         m_MaterialIcon.gameObject.SetActive(false);
         m_ComponentIcon.gameObject.SetActive(false);
         m_ItemNameLabel.text = "RGB ( " + (color.r * 100).ToString("0") + "%, " + (color.g * 100).ToString("0") + "%, " + (color.b * 100).ToString("0") + "% )";
         m_IconMask.SetActive(true);
         m_lastMat   = null;
         m_lastDecal = null;
         m_lastPart  = null;
         m_lastColor = color;
     }
     else
     {
         m_UIGroup.SetActive(false);
         m_lastMat   = null;
         m_lastDecal = null;
         m_lastPart  = null;
         m_lastColor = Color.clear;
     }
 }
Exemple #12
0
    public void Play(bool forward)
    {
        GameObject go = (this.tweenTarget != null) ? this.tweenTarget : base.gameObject;

        if (!NGUITools.GetActive(go))
        {
            if (this.ifDisabledOnPlay != EnableCondition.EnableThenPlay)
            {
                return;
            }
            NGUITools.SetActive(go, true);
        }
        this.mTweens = !this.includeChildren ? go.GetComponents <UITweener>() : go.GetComponentsInChildren <UITweener>();
        if (this.mTweens.Length == 0)
        {
            if (this.disableWhenFinished != DisableCondition.DoNotDisable)
            {
                NGUITools.SetActive(this.tweenTarget, false);
            }
        }
        else
        {
            bool flag = false;
            if (this.playDirection == AnimationOrTween.Direction.Reverse)
            {
                forward = !forward;
            }
            int index  = 0;
            int length = this.mTweens.Length;
            while (index < length)
            {
                UITweener tweener = this.mTweens[index];
                if (tweener.tweenGroup == this.tweenGroup)
                {
                    if (!flag && !NGUITools.GetActive(go))
                    {
                        flag = true;
                        NGUITools.SetActive(go, true);
                    }
                    if (this.playDirection == AnimationOrTween.Direction.Toggle)
                    {
                        tweener.Toggle();
                    }
                    else
                    {
                        tweener.Play(forward);
                    }
                    if (this.resetOnPlay)
                    {
                        tweener.Reset();
                    }
                    tweener.onFinished = this.onFinished;
                    if ((this.eventReceiver != null) && !string.IsNullOrEmpty(this.callWhenFinished))
                    {
                        tweener.eventReceiver    = this.eventReceiver;
                        tweener.callWhenFinished = this.callWhenFinished;
                    }
                }
                index++;
            }
        }
    }
 /// <summary>
 /// ダメージを受けたとき
 /// </summary>
 public void OnDamage()
 {
     damageEffect.Reset();
     damageEffect.Play(true);
 }
    // Token: 0x06000074 RID: 116 RVA: 0x000171B4 File Offset: 0x000153B4
    public void Play(bool forward)
    {
        GameObject gameObject = (!(this.tweenTarget == null)) ? this.tweenTarget : base.gameObject;

        if (!NGUITools.GetActive(gameObject))
        {
            if (this.ifDisabledOnPlay != EnableCondition.EnableThenPlay)
            {
                return;
            }
            NGUITools.SetActive(gameObject, true);
        }
        this.mTweens = ((!this.includeChildren) ? gameObject.GetComponents <UITweener>() : gameObject.GetComponentsInChildren <UITweener>());
        if (this.mTweens.Length == 0)
        {
            if (this.disableWhenFinished != DisableCondition.DoNotDisable)
            {
                NGUITools.SetActive(this.tweenTarget, false);
            }
        }
        else
        {
            bool flag = false;
            if (this.playDirection == Direction.Reverse)
            {
                forward = !forward;
            }
            int i   = 0;
            int num = this.mTweens.Length;
            while (i < num)
            {
                UITweener uitweener = this.mTweens[i];
                if (uitweener.tweenGroup == this.tweenGroup)
                {
                    if (!flag && !NGUITools.GetActive(gameObject))
                    {
                        flag = true;
                        NGUITools.SetActive(gameObject, true);
                    }
                    if (this.playDirection == Direction.Toggle)
                    {
                        uitweener.Toggle();
                    }
                    else
                    {
                        uitweener.Play(forward);
                    }
                    if (this.resetOnPlay)
                    {
                        uitweener.Reset();
                    }
                    uitweener.onFinished = this.onFinished;
                    if (this.eventReceiver != null && !string.IsNullOrEmpty(this.callWhenFinished))
                    {
                        uitweener.eventReceiver    = this.eventReceiver;
                        uitweener.callWhenFinished = this.callWhenFinished;
                    }
                }
                i++;
            }
        }
    }
Exemple #15
0
    public static void TweenPlay(GameObject go, int tweenGroup, Direction playDirection, bool resetOnPlay, EnableCondition ifDisabledOnPlay, DisableCondition disableWhenFinished, bool includeChildren)
    {
        if (!go.activeSelf)
        {
            // If the object is disabled, don't do anything
            if (ifDisabledOnPlay != EnableCondition.EnableThenPlay)
            {
                return;
            }

            // Enable the game object before tweening it
            NGUITools.SetActive(go, true);
        }

        // Gather the tweening components
        UITweener[] mTweens = includeChildren ? go.GetComponentsInChildren <UITweener>() : go.GetComponents <UITweener>();

        if (mTweens.Length == 0)
        {
            // No tweeners found -- should we disable the object?
            if (disableWhenFinished != DisableCondition.DoNotDisable)
            {
                NGUITools.SetActive(go, false);
            }
        }
        else
        {
            bool activated = false;

            // Run through all located tween components
            for (int i = 0, imax = mTweens.Length; i < imax; ++i)
            {
                UITweener tw = mTweens[i];

                // If the tweener's group matches, we can work with it
                if (tw.tweenGroup == tweenGroup)
                {
                    // Ensure that the game objects are enabled
                    if (!activated && !go.activeSelf)
                    {
                        activated = true;
                        NGUITools.SetActive(go, true);
                    }

                    // Toggle or activate the tween component
                    if (playDirection == Direction.Toggle)
                    {
                        tw.Toggle();
                    }
                    else if (playDirection == Direction.Forward)
                    {
                        tw.Play(true);
                    }
                    else
                    {
                        tw.Play(false);
                    }

                    if (resetOnPlay)
                    {
                        tw.Reset();
                    }
                }
            }
        }
    }
Exemple #16
0
 /// <summary>
 /// ミサイル発射
 /// </summary>
 public void OnXButton()
 {
     missileShotEffect.Reset();
     missileShotEffect.Play(false);
 }
Exemple #17
0
 /// <summary>
 /// 光学弾発射
 /// </summary>
 public void OnBButton()
 {
     opticalShotEffect.Reset();
     opticalShotEffect.Play(false);
 }
Exemple #18
0
    public void Play(Boolean forward)
    {
        GameObject gameObject = (!(tweenTarget == null)) ? tweenTarget : this.gameObject;

        if (!NGUITools.GetActive(gameObject))
        {
            if (ifDisabledOnPlay != EnableCondition.EnableThenPlay)
            {
                return;
            }
            NGUITools.SetActive(gameObject, true);
        }
        mTweens = ((!includeChildren) ? gameObject.GetComponents <UITweener>() : gameObject.GetComponentsInChildren <UITweener>());
        if (mTweens.Length == 0)
        {
            if (disableWhenFinished != DisableCondition.DoNotDisable)
            {
                NGUITools.SetActive(tweenTarget, false);
            }
        }
        else
        {
            Boolean flag = false;
            if (playDirection == Direction.Reverse)
            {
                forward = !forward;
            }
            Int32 i   = 0;
            Int32 num = mTweens.Length;
            while (i < num)
            {
                UITweener uitweener = mTweens[i];
                if (uitweener.tweenGroup == tweenGroup)
                {
                    if (!flag && !NGUITools.GetActive(gameObject))
                    {
                        flag = true;
                        NGUITools.SetActive(gameObject, true);
                    }
                    if (playDirection == Direction.Toggle)
                    {
                        uitweener.Toggle();
                    }
                    else
                    {
                        uitweener.Play(forward);
                    }
                    if (resetOnPlay)
                    {
                        uitweener.Reset();
                    }
                    uitweener.onFinished = onFinished;
                    if (eventReceiver != null && !String.IsNullOrEmpty(callWhenFinished))
                    {
                        uitweener.eventReceiver    = eventReceiver;
                        uitweener.callWhenFinished = callWhenFinished;
                    }
                }
                i++;
            }
        }
    }