예제 #1
0
    // Update is called once per frame
    void Update()
    {
        if (m_startupLayer && m_currentLayer && Time.time >= 2.0f && !m_startAnimation)
        {
            blindGUIAnimationState targetShowAnimation = new blindGUIAnimationState(m_startupLayer);
            targetShowAnimation.alpha = 1.0f;
            m_startupLayer.AnimateTo(targetShowAnimation, 1.0f);
            m_startAnimation = true;

            blindGUIAnimationState targetHideAnimation = new blindGUIAnimationState(m_currentLayer);
            targetHideAnimation.alpha = 0.0f;
            m_currentLayer.AnimateTo(targetHideAnimation, 1.0f);
        }

        if (Time.time <= 3.0f)
        {
            GameObject loadIndicatorGO = GameObject.Find("LoadIndicator");
            if (loadIndicatorGO)
            {
                blindGUITexturedContainer loadIndicator = loadIndicatorGO.GetComponent <blindGUITexturedContainer>();
                if (loadIndicator)
                {
                    loadIndicator.m_angle = 30 * (int)(Time.time * 10.0f);
                }
            }
        }
    }
 public void OnButtonClick( blindGUIButton sender )
 {
     if ((sender.name == "OKButton") && m_layer) {
         blindGUIAnimationState targetShowAnimation = new blindGUIAnimationState( m_layer );
         targetShowAnimation.alpha = 0.0f;
         m_layer.AnimateTo( targetShowAnimation, 1.0f);
     }
 }
예제 #3
0
 public void OnButtonClick(blindGUIButton sender)
 {
     if ((sender.name == "OKButton") && m_layer)
     {
         blindGUIAnimationState targetShowAnimation = new blindGUIAnimationState(m_layer);
         targetShowAnimation.alpha = 0.0f;
         m_layer.AnimateTo(targetShowAnimation, 1.0f);
     }
 }
 // Update is called once per frame
 void Update()
 {
     if (m_layer && Time.time >= 1.0f && !m_startAnimation) {
         blindGUIAnimationState targetShowAnimation = new blindGUIAnimationState( m_layer );
         targetShowAnimation.alpha = 1.0f;
         m_layer.AnimateTo( targetShowAnimation, 1.0f);
         m_startAnimation = true;
     }
 }
예제 #5
0
 // Update is called once per frame
 void Update()
 {
     if (m_layer && Time.time >= 1.0f && !m_startAnimation)
     {
         blindGUIAnimationState targetShowAnimation = new blindGUIAnimationState(m_layer);
         targetShowAnimation.alpha = 1.0f;
         m_layer.AnimateTo(targetShowAnimation, 1.0f);
         m_startAnimation = true;
     }
 }
 void OnButtonClick( blindGUIButton sender )
 {
     if (sender == m_connectedButton) {
         if (m_currentLayer != null) {
             blindGUIAnimationState targetState = new blindGUIAnimationState( m_currentLayer );
             targetState.alpha = 0.0f;
             m_currentLayer.AnimateTo(targetState, 1.0f);
         }
         if (m_switchLayer != null) {
             blindGUIAnimationState targetState = new blindGUIAnimationState( m_switchLayer );
             targetState.alpha = 1.0f;
             m_switchLayer.AnimateTo(targetState, 1.0f,null,iTweenInBlindGUI.EaseType.linear,0.25f);
         }
     }
 }
예제 #7
0
    /// <summary>
    /// Starts Animation from objects current state to new
    /// </summary>
    /// <param name="targetState">
    /// Target animation state <see cref="blindGUIAnimationState"/>
    /// </param>
    /// <param name="animationTime">
    /// Duration of animation <see cref="System.Single"/>
    /// </param>
    /// <param name="animationCompleteDelegate">
    /// This function will be called after animation is finished <see cref="AnimationCompleteDelegate"/>
    /// </param>
    /// <param name="easeType">
    /// Animation Ease type <see cref="iTweenInBlindGUI.EaseType"/>
    /// </param>
    /// <param name="delay">
    /// Delay of animation <see cref="System.Single"/>
    /// </param>
    public void AnimateTo(blindGUIAnimationState targetState, float animationTime, AnimationCompleteDelegate animationCompleteDelegate, iTweenInBlindGUI.EaseType easeType, float delay)
    {
        m_animationCompleteDelegate = animationCompleteDelegate;
        m_animationTime             = animationTime;
        m_startAnimationState       = new blindGUIAnimationState(this);
        m_finishAnimationState      = targetState;

        //iTweenInBlindGUI.StopByName(this.name+"_animation");
        iTweenInBlindGUI.ValueTo(this.gameObject, iTweenInBlindGUI.Hash(
                                     "name", this.name + "_animation",
                                     "time", m_animationTime,
                                     "delay", delay,
                                     "from", 0,
                                     "to", 1,
                                     "easetype", easeType,
                                     "onupdate", "AnimationStep",
                                     "oncomplete", "AnimationFinished"));
    }
예제 #8
0
 void OnButtonClick(blindGUIButton sender)
 {
     if (sender == m_connectedButton)
     {
         if (m_currentLayer != null)
         {
             blindGUIAnimationState targetState = new blindGUIAnimationState(m_currentLayer);
             targetState.alpha = 0.0f;
             m_currentLayer.AnimateTo(targetState, 1.0f);
         }
         if (m_switchLayer != null)
         {
             blindGUIAnimationState targetState = new blindGUIAnimationState(m_switchLayer);
             targetState.alpha = 1.0f;
             m_switchLayer.AnimateTo(targetState, 1.0f, null, iTweenInBlindGUI.EaseType.linear, 0.25f);
         }
     }
 }
    // Update is called once per frame
    void Update()
    {
        if (m_startupLayer && m_currentLayer && Time.time >= 2.0f && !m_startAnimation) {

            blindGUIAnimationState targetShowAnimation = new blindGUIAnimationState( m_startupLayer );
            targetShowAnimation.alpha = 1.0f;
            m_startupLayer.AnimateTo( targetShowAnimation, 1.0f);
            m_startAnimation = true;

            blindGUIAnimationState targetHideAnimation = new blindGUIAnimationState( m_currentLayer );
            targetHideAnimation.alpha = 0.0f;
            m_currentLayer.AnimateTo( targetHideAnimation, 1.0f);
        }

        if (Time.time <= 3.0f) {
            GameObject loadIndicatorGO = GameObject.Find("LoadIndicator");
            if (loadIndicatorGO) {
                blindGUITexturedContainer loadIndicator	= loadIndicatorGO.GetComponent<blindGUITexturedContainer>();
                if (loadIndicator) {
                    loadIndicator.m_angle = 30*(int)(Time.time*10.0f);
                }
            }
        }
    }
예제 #10
0
 /// <summary>
 /// Starts Animation from objects current state to new
 /// </summary>
 /// <param name="targetState">
 /// Target animation state <see cref="blindGUIAnimationState"/>
 /// </param>
 /// <param name="animationTime">
 /// Duration of animation <see cref="System.Single"/>
 /// </param>
 /// <param name="animationCompleteDelegate">
 /// This function will be called after animation is finished <see cref="AnimationCompleteDelegate"/>
 /// </param>
 public void AnimateTo(blindGUIAnimationState targetState, float animationTime, AnimationCompleteDelegate animationCompleteDelegate)
 {
     AnimateTo(targetState, animationTime, animationCompleteDelegate, iTweenInBlindGUI.EaseType.linear, 0.0f);
 }
예제 #11
0
 /// <summary>
 /// Starts Animation from objects current state to new
 /// </summary>
 /// <param name="targetState">
 /// Target animation state <see cref="blindGUIAnimationState"/>
 /// </param>
 /// <param name="animationTime">
 /// Duration of animation <see cref="System.Single"/>
 /// <param name="easeType">
 /// Animation Ease type <see cref="iTweenInBlindGUI.EaseType"/>
 /// </param>
 public void AnimateTo(blindGUIAnimationState targetState, float animationTime, iTweenInBlindGUI.EaseType easeType)
 {
     AnimateTo(targetState, animationTime, null, easeType, 0.0f);
 }
    /// <summary>
    /// Starts Animation from objects current state to new
    /// </summary>
    /// <param name="targetState">
    /// Target animation state <see cref="blindGUIAnimationState"/>
    /// </param>
    /// <param name="animationTime">
    /// Duration of animation <see cref="System.Single"/>
    /// </param>
    /// <param name="animationCompleteDelegate">
    /// This function will be called after animation is finished <see cref="AnimationCompleteDelegate"/>
    /// </param>
    /// <param name="easeType">
    /// Animation Ease type <see cref="iTweenInBlindGUI.EaseType"/>
    /// </param>
    /// <param name="delay">
    /// Delay of animation <see cref="System.Single"/>
    /// </param>
    public void AnimateTo( blindGUIAnimationState targetState, float animationTime, AnimationCompleteDelegate animationCompleteDelegate, iTweenInBlindGUI.EaseType easeType, float delay )
    {
        m_animationCompleteDelegate = animationCompleteDelegate;
        m_animationTime = animationTime;
        m_startAnimationState = new blindGUIAnimationState( this );
        m_finishAnimationState = targetState;

        //iTweenInBlindGUI.StopByName(this.name+"_animation");
        iTweenInBlindGUI.ValueTo( this.gameObject, iTweenInBlindGUI.Hash(
                                                                 					"name", this.name+"_animation",
                                                                                    "time", m_animationTime,
                                                                                    "delay", delay,
                                                                                    "from", 0,
                                                                                    "to", 1,
                                                                         			"easetype", easeType,
                                                                                    "onupdate", "AnimationStep",
                                                                                    "oncomplete", "AnimationFinished"));
    }
 /// <summary>
 /// Starts Animation from objects current state to new
 /// </summary>
 /// <param name="targetState">
 /// Target animation state <see cref="blindGUIAnimationState"/>
 /// </param>
 /// <param name="animationTime">
 /// Duration of animation <see cref="System.Single"/>
 /// </param>
 /// <param name="animationCompleteDelegate">
 /// This function will be called after animation is finished <see cref="AnimationCompleteDelegate"/>
 /// </param>	
 public void AnimateTo( blindGUIAnimationState targetState, float animationTime, AnimationCompleteDelegate animationCompleteDelegate )
 {
     AnimateTo(targetState, animationTime, animationCompleteDelegate, iTweenInBlindGUI.EaseType.linear, 0.0f);
 }
 /// <summary>
 /// Starts Animation from objects current state to new
 /// </summary>
 /// <param name="targetState">
 /// Target animation state <see cref="blindGUIAnimationState"/>
 /// </param>
 /// <param name="animationTime">
 /// Duration of animation <see cref="System.Single"/>
 /// <param name="easeType">
 /// Animation Ease type <see cref="iTweenInBlindGUI.EaseType"/>
 /// </param>
 public void AnimateTo( blindGUIAnimationState targetState, float animationTime, iTweenInBlindGUI.EaseType easeType )
 {
     AnimateTo(targetState, animationTime, null, easeType, 0.0f);
 }