• MobileMenuScene来点动画效果


      MobileMenuBase可以有效的实现渐变效果,并且给自己的iPad页面架上黑条。

      var Texture2D iPadBackgroundTexture;

      var MobileMenuObject.UVCoords iPadBackgroundCoords;

    2.这是实现渐变效果的相关

      var float fadetime和fadeDuration;  //前者是现在的时间,Duration是自定义淡出多快

      var bool bFadeOut;   //是淡入还是淡出

      bCloseOnFadeOut //见名知意

      function Fade(bool bIsFadeOut,float FadeDur)

        {

            local int i;

        FadeTime=0;

       FadeDuration=FadeDur;   //这两个参数来制定我们前边的那几个变量

       bFadeOut=bIsFadeOut;    //   

        if(bFadeOut)

        {

          for(i=0;i<MenuObjects.length;i++)  

          {

               MenuObjects[i].bIsActive=false;    //遍历所有并且关闭,奇怪的是我的文字没有隐藏,我得解决这个问题
               }

        }
        }

       Opacity来调节透明度,我们有一个有趣的语句来进行是淡入还是淡出执行,这个语句是动态插值的

    static final function float FInterpEaseOut ( float A, float B, float Alpha, float Exp) )
    Interpolates with ease-out (smoothly departs A).
    @param A Value to interpolate from.
    @param B Value to interpolate to.
    @param Alpha Interpolant.
    @param Exp Exponent. Higher values result in more rapid acceleration.
    @return Interpolated value.

      FInterpEaseOut(1,0,FadeTime/FadeDuration,2.0);   //从解说中可以看到,从1渐变到0,并且当前时间和周期可以当做一个比值,FadeTime在下边有

      FadeTime+=RenderDelta;   因此FadeTime/FadeDuration会越来越大.

      最后,这个函数会返回一个中间值,中间值是从1到0过渡的,也就是Opacity=越来越淡,后边的数值可以调节其变化速度。


  • 相关阅读:
    MYSQL函数 Cast和convert的用法详解
    MySQL5.7.9(GA)的安装
    TMS Scripter importtool的使用
    MySQL 高可用架构在业务层面的应用分析
    UNIGUI:How to redirect and close session?
    HTML URL 编码:请参阅:http://www.w3school.com.cn/tags/html_ref_urlencode.html
    js 解决函数加载的问题
    必备函数
    Action 分离
    JavaScript.Remove
  • 原文地址:https://www.cnblogs.com/NEOCSL/p/3128659.html
Copyright © 2020-2023  润新知