实现卷轴效果的脚本

复制代码
// Scroll main texture based on time
 
  var scrollSpeed = -0.5;
 
  // This must be set to override a bug where Render Order
 
  // of the tunnel objects is lost when SetTextureOffset is used
 
  var queue = 0;
 
  private var offset = 0.0;
 
  function Update ()
 
  {
 
  offset = Time.time * scrollSpeed;
 
  renderer.material.SetTextureOffset (“_MainTex”, Vector2(offset,0));
 
  renderer.material.renderQueue = queue;
 
  }

 
复制代码
posted @ 2017-06-01 12:05  杨铭宇  阅读(388)  评论(0编辑  收藏  举报
友情链接:回力球鞋 | 中老年女装 | 武汉英语学校 | 雅思备考 | 托福备考