标签:style blog io color ar sp div on log
using UnityEngine; using System.Collections; /// <summary> /// 2d背景循环滚动 /// </summary> public class Test : MonoBehaviour { public float xScrollSpeed=0.1f; public float yScrollSpeed=0f; void Update() { float offsetX = Time.time * xScrollSpeed; float offsetY = Time.time * yScrollSpeed; renderer.material.SetTextureOffset("_MainTex", new Vector2(offsetX, offsetY)); } }
标签:style blog io color ar sp div on log
原文地址:http://www.cnblogs.com/123ing/p/4088863.html